Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to 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 25-Nov-11 21:09pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see here[^] for some suggestions.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please include glut32.lib.
 
Following functions are available in glut32.lib
 
___glutCreateWindowWithExit@8
___glutInitWithExit@12
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 230
1 PIEBALDconsult 150
2 DamithSL 125
3 BillWoodruff 108
4 Garth J Lancaster 90
0 OriginalGriff 5,790
1 DamithSL 4,601
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,195


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 11 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100