🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
tan,log etc undefined reference
Hi,
I was trying an openGL program in my system. When I tried to compile it I got the following errors
In libGL.so
undefined refrence to log,tan,floor etc. I do know that these are in math.h but I am not using it. Does anybody know why libGL.so giving such problems ?
I am using
MesaGL-3.0
Slackware 7.0 (like anyone is really bothere what I use)
Xfree 3.3.5(XF86_SVGA of 3.3.6)
Thank you
This is probably because the maths library isn''t linked into libgl itself. Try adding -lm to your linker command line to include it.
cu,
Prefect
Sanity is the trademark of a weak mind.
cu,
Prefect
Sanity is the trademark of a weak mind.
quote: Original post by flame_warrior
I do know that these are in math.h but I am not using it.
OpenGL certainly use maths and therefore needs the maths library linked.
Got it working, thank you.
This is what I have to type :-
cc filename.c -L/usr/lib -lGL -lGLU -lglut -L/usr/X11R6/lib -lXaw3d -lXxf86vm -lm
to compile an openGL app -ugh.
What did they do in X > 4.0 ? Linked all libraries to Xxf86vm ?
This is what I have to type :-
cc filename.c -L/usr/lib -lGL -lGLU -lglut -L/usr/X11R6/lib -lXaw3d -lXxf86vm -lm
to compile an openGL app -ugh.
What did they do in X > 4.0 ? Linked all libraries to Xxf86vm ?
Those are for specific access to XF86 (XFree86) features
and are usually only valuable at the glX level.
This also limits your game to players using XF86 as their
X server (there are other X servers out there).
You might want to weigh the importance of the absolute need
of accessing XF86''s specific features in your game.
and are usually only valuable at the glX level.
This also limits your game to players using XF86 as their
X server (there are other X servers out there).
You might want to weigh the importance of the absolute need
of accessing XF86''s specific features in your game.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement