Click here to Skip to main content
15,880,651 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
slam,nd hi,

i m using vs 2008 professional edition,
i want to configure it with openGl,
i m trying this,

Put freeglut.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’ (note: you'll have to create the GL folder)
Put freeglut_ext.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’
Put freeglut_std.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’
Put freeglut.lib in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\’
Put freeglut.dll in: ‘C:\WINDOWS\system32\’
Put glut32.dll in: ‘C:\WINDOWS\system32\’
Put glut32.lib in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\’
Put glut.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’

all files are placed according to this.

when i try a sample code i have followings errors.



Error 1 error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8 openGl.obj

Error 2 error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4 openGl.obj

Error 3 fatal error LNK1120: 2 unresolved externals

please tell me what i m doing wrong, and what is the right way.

waiting for ans..
Posted

Please see here[^] for some suggestions.
 
Share this answer
 
Please include glut32.lib.

Following functions are available in glut32.lib

VB
___glutCreateWindowWithExit@8
___glutInitWithExit@12
 
Share this answer
 
It is related to linking stage and it can not find glut32.lib or freeglut.lib.

In VS2010 go to Project Properties > Configuration Properties > Linker > Input > Additional Dependencies
Add you glut32.lib and freeglut.lib with full path to that entry.

It will find them at linking stage.

If you don't have VS2010 please find something that show the same option as above to declare to the linker where it can find those files.

Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900