tags:

views:

99

answers:

1

Hi,

I have tried all the solutions floating around the net that i could find.. but still no sucess in compiling a simple nehe tutorial on Windows 7 with MSVS C++ 2010 express edition.

If anyone can give me clues on how to proceed i would be thankful.

Thanks.

Edit:errors

------ Build started: Project: Polyons, Configuration: Debug Win32 ------
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\Ashish\Downloads\GameloftOpenGL\02Polygons\.\Debug\Polyons.exe) does not match the Linker's OutputFile property value (C:\Users\Ashish\Downloads\GameloftOpenGL\02Polygons\Debug\test.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(Polyons) does not match the Linker's OutputFile property value (test). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
Polygons.obj : error LNK2019: unresolved external symbol _gluPerspective referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glLoadIdentity referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glMatrixMode referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glViewport referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glHint referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glDepthFunc referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glEnable referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glClearDepth referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glClearColor referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glShadeModel referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Polygons.obj : error LNK2019: unresolved external symbol _glEnd referenced in function "void __cdecl DrawCube(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)" (?DrawCube@@YAXMMMMMMMMMMMMMMMMMMMMMMMM@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glVertex3f referenced in function "void __cdecl DrawCube(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)" (?DrawCube@@YAXMMMMMMMMMMMMMMMMMMMMMMMM@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glColor3f referenced in function "void __cdecl DrawCube(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)" (?DrawCube@@YAXMMMMMMMMMMMMMMMMMMMMMMMM@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glBegin referenced in function "void __cdecl DrawCube(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)" (?DrawCube@@YAXMMMMMMMMMMMMMMMMMMMMMMMM@Z)
Polygons.obj : error LNK2019: unresolved external symbol _glClear referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
.\Debug/test.exe : fatal error LNK1120: 15 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
+1  A: 

You have to link with the proper libraries

Go to Project->Settings->Linker->input->additional libraries, and add:

opengl32.lib glu32.lib
Calvin1602