🎉 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

Started by
3 comments, last by flame_warrior 23 years, 4 months ago
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
Hello from my world
Advertisement
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

Resist Windows XP''s Invasive Production Activation Technology!
Sanity is the trademark of a weak mind.
Widelands - laid back, free software strategy
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 ?
Hello from my world
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.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.

This topic is closed to new replies.

Advertisement