PDA

View Full Version : Unresolved text symbol "cos" ?



joeydemario
04-25-2005, 06:47 AM
hello,
I'm trying to compile a simple 3d cube model from one of the tutorials but keep getting compiler error:


ld32:ERROR 33: Unresolved text symbol "cos" -- 1st referenced by /usr/freeware/lib32/libglut.a(glut_shapes.a). OS is IRIX 6.5 and compiler is GNU GCC.

RigidBody
04-25-2005, 09:48 AM
you have to add the math library using the -lm flag:

gcc -o test test.c -lm