openGL in solaris
Hi there, I had all my codes written in Windows, now I am trying to port it to Solaris. I think I have the GL libraries in the /usr/lib already, such as libGL.so, libGL.so.1, libGLU.so and libGLU.so.1@, but I''m afraid the solaris box doesn''t have the glut libraries and the headers.
However, I obtained these files (libMesaGL.a, libMesaGL.so, libMesaGLU.a, libMesaGLU.so) and put them in the same directory as my other codes. I also put the glut.h, gl.h, etc in the same folder, and change the #include header to "glut.h". I don''t have root access so I can''t put them in the right place.
I always get symbol reference errors on all the GL and glut functions.
I wonder if I have the correct libraries in the right place.
Does anybody know how to compile?
thanks a lot
You don''t have the glut libraries from what I can see. I recommend either downloading the latest Mesa (which has glut 3.7) or download and build it directly from:
http://reality.sgi.com/mjk/glut3/glut3.html
A sample Makefile would then be:
CXX = c++
INCLUDES = -I/usr/local/include -I/usr/openwin/include
LDFLAGS = -L/usr/local/lib -L/usr/openwin/lib
######## Note the "-lglut"
LDLIBS = -lMesaGLU -lMesaGL -lglut
########
LDLIBS += -lm -lX11 -lXext -lXmu -lXi -mt
CPPFLAGS = -Wall $(INCLUDES)
OBJECTS = lesson1.o
.cpp.o :
$(CXX) $(CPPFLAGS) -c $<
all: lesson1
lesson1: lesson1.o
$(CC) -o $@ $(LDFLAGS) lesson1.o $(LDLIBS)
Other examples which work on Solaris can be found at:
http://opengl.koolhost.com
--Andy
http://reality.sgi.com/mjk/glut3/glut3.html
A sample Makefile would then be:
CXX = c++
INCLUDES = -I/usr/local/include -I/usr/openwin/include
LDFLAGS = -L/usr/local/lib -L/usr/openwin/lib
######## Note the "-lglut"
LDLIBS = -lMesaGLU -lMesaGL -lglut
########
LDLIBS += -lm -lX11 -lXext -lXmu -lXi -mt
CPPFLAGS = -Wall $(INCLUDES)
OBJECTS = lesson1.o
.cpp.o :
$(CXX) $(CPPFLAGS) -c $<
all: lesson1
lesson1: lesson1.o
$(CC) -o $@ $(LDFLAGS) lesson1.o $(LDLIBS)
Other examples which work on Solaris can be found at:
http://opengl.koolhost.com
--Andy
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement