PDA

View Full Version : glutBitmapString undefined



Vincent22
12-07-2011, 09:27 AM
Hi everyone.
I read that function glutBitmapString(font, string) write a string on screen.

If I try to use this function I have an undefined compile error. I include glut and opengl headers and I use Xcode 4

carsten neumann
12-07-2011, 02:21 PM
In general to resolve build problems it is helpful if you post the complete error message you get.

Undefined symbols are reported by the linker (not the compiler) and inform you that none of the object files (.o generated by the compiler from the corresponding .c/.cpp) or libraries that you are linking contain a symbol of the given name.
It sounds like you are not linking the glut library.

I don't know exactly how to do this in Xcode, but there should be a dialog where you can configure the libraries to link with - possibly under something like project properties/dependencies or some such.

_arts_
12-07-2011, 02:54 PM
He seems to link with glut.

Cf this topic: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=307239#Post3072 39

So it might be something else, like using glut headers from one version and glut library from another version. Try to check if you use both headers and libraries from the same version (glut, freeglut or so) but don't mix them.