Problems with KDevelop when using Qt QGLWidget

leesongchen leesongchen at 263.net
Tue Aug 24 15:56:02 BST 1999


hi:
  all you need is -lXmu.
   when you meet such problem next time,you should first locate the problem.one
is compile error,the other is link error.how can i know it?see which file cause
the error,e.g. if the message is:
  "myapp.cpp: undefined simble...",we know it is wrong with "myapp.cpp",so it is
a complie error.mostly it is syntax error.but your message is:

/usr/local/qt/lib/libqgl.a(qgl.o): In function `choose_cmap(_XDisplay *,
XVisualInfo *)': qgl.o(.text+0x66d): undefined reference to
`XmuLookupStandardColormap' collect2: ld returned 1 exit status

the file is "libqgl.a", so we know it is a link error.such errors are often
caused by missing some library.how can know which library is missing?
you can guess from the name.you see:
"undefined reference to XmuLookupStandardColormap",so you may guess 
the library is Xmu (from the first 3 letters).you can use 'ldconfig -p|grep Xmu'
to check it.the functions usually has the same first letters with their
libraries for convinence.
  
  by the way,when you do OpenGL work under linux. the libraries are(mostly):
		your qt libraies
		your kde libraies
		-lX11 -lXext -lXt -lXmu -lXi
		-lGL -lGLU -lglut
		-lm
have i said too much :-(.  good luck,if you succeed,please give me a feedback
thank you.(i am not an english-spoken man,execuse my syntax errors :-)

best regards.



More information about the KDevelop mailing list