PDA

View Full Version : how to use the function "glutinit()" and "glutcreatewindows()"



clm77
04-16-2003, 07:54 PM
when I use the two functions,The VC6.0 shows message "LINKING 2001 error"
but when i use the other glut's functions such as "glutinitdisplay()" ,there is no errors why?

04-17-2003, 02:56 AM
Have you linked glut32.lib to your project?

nexusone
04-17-2003, 07:06 AM
there is not a glutCreateWindows function, it is glutCreateWindow.


int main(int argc, char** argv)
{
glutInit(&argc, argv); // Start glut library, pass any extra command line commands to glut.
// glutInit must be called before any other glut commands, both argc and argv can be null values.
glutCreateWindow (argv[0]); // Create window
// argv[0] can be replace with "Name of window"
glutCreateWindow ("OpenGL window");


see my glut example on my website:
www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)



Originally posted by clm77:
when I use the two functions,The VC6.0 shows message "LINKING 2001 error"
but when i use the other glut's functions such as "glutinitdisplay()" ,there is no errors why?



[This message has been edited by nexusone (edited 04-17-2003).]

clm77
04-17-2003, 04:00 PM
TO skman:
yes,i have added the "glut32.lib" in the project,but the error message is still showed!
TO nexusone:
yes I use the two functions just like you shows to me but VC++ still shows the message!
And I come from China, the website can't be linked ! Would you email the example to me(clm77@163.com)?
thanks a lot!

Deiussum
04-18-2003, 04:22 AM
Maybe you should post the exact errors. It might just be that you don't have the glut library installed.

Vlasko
04-18-2003, 04:58 AM
there's no intalation for glut just copying the files in right directory:-)

Deiussum
04-18-2003, 06:01 AM
Which is basically a manual installation. The point is if he DOESN'T have the files in the right spot, he may get linker errors.