View Full Version : undefined reference to `glutBitmapCharacter'

11-11-2002, 10:16 AM
Glut 3.6 is installed and I ran ldconfig too, but I get this:

/tmp/ccZMk6ER.o(.text+0x1105): undefined reference to `glutBitmapTimesRoman10'
/tmp/ccZMk6ER.o(.text+0x110a): undefined reference to `glutBitmapCharacter'
collect2: ld returned exit status
make: *** [all] Error 1

I do have #include <GL/glut.h> in the code {at the top}
and the offending lines look like:

for (blah = 0; p2[blah]; blah = blah + 1)
glutBitmapCharacter(GLUT_BITMAP_NEW_TIMES_ROMAN_10 , p2[blah]);

I'm running on linux {Slackware 8.1} 2.4.19
on athlon, w GeForce video.
Glut 3.6, Mesa 4.0.4 abd SDL-1.2.5 are all
installed can you please tell me what is up?

11-11-2002, 11:59 PM
Hi !

No idea what the problem is but do notice that the error message is from ld (the linker) and not from gcc (the compiler).

I assume you have -lglut included so that you have the library linked in, make sure you don't have more then one copy of libglut installed.


11-12-2002, 04:34 PM
Doh.... Damn Makefiles...
That was the problem {no -lglut}
That's what I get for using someone elses code http://www.opengl.org/discussion_boards/ubb/smile.gif