LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   first opengl programm (https://www.linuxquestions.org/questions/linux-newbie-8/first-opengl-programm-397225/)

sakr 12-28-2005 11:03 AM

first opengl programm
 
hello everybody
thatī s my first post here, and i hope that i will find an answer.
i try to run my first opengl program, and i just copy a simple source code but i get following errors at linking it:

Quote:

/usr/lib//libglut.a(glut_cmap.o)(.text+0x3a8):In function '__glutSetupColormap':
: undefined reference to 'XmuLookupStandardColormap'
collect2: ld returned 1 exit status

here is my (simple) makefile :

Quote:

all : test

test : opengltest.o
g++ -o test opengltest.o -L /usr/lib/ -lGLU -lglut

opengltest.o : opengltest.cpp
g++ -c opengltest.cpp


Ha1f 12-28-2005 11:20 AM

Well. I dont know opengl, but I know a bit of C++ and C, and it looks like your problem is that 'XmuLookupStandardColormap' isnt defined before its called.

thompson42 12-28-2005 11:26 AM

I expect you will also need to link against at least some of these libraries.

-lGLw -lGL -lXm -lXt -lX11

sakr 12-28-2005 11:35 AM

thank you all
i resolve the problem using the library -lXm, the programm functions now.


All times are GMT -5. The time now is 03:46 PM.