PDA

View Full Version : unresolved external symbol??--help!



cali
09-27-2001, 11:44 PM
Does anyone know anything about these errors? And if so, how do I go about resolving it?? Any suggestions would be great appreciated!!

unresolved external symbol ___glutInitWithExit@12
error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8

Morglum
09-28-2001, 03:54 AM
This message means that the linker has not managed to link the glut library with your code. If you are using VC++, just specify that you want glut32.lib to be linked. If you are using a Borland compiler, you must know that the standard glut libs are not compatible with borland.

Hope that helps
Morglum

Rob The Bloke
09-28-2001, 03:57 AM
Originally posted by cali:
unresolved external symbol ___glutInitWithExit@12
error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8

I've seen those before, change the way the app is initialised :

I reackon your main function looks like :

void main(void)
{

}

change it to

void main(int argc, char** argv)
{
glutInit(&argc, argv);

}

it should now work

ffish
09-28-2001, 06:02 AM
Originally posted by Rob The Bloke:
change it to

void main(int argc, char** argv)
{
glutInit(&argc, argv);

}
I'd change your's to:

int main(int argc, char **argv)
{
...
glutInit(&argc, argv);
...
return 0;
}
</nitpick> http://www.opengl.org/discussion_boards/ubb/tongue.gif