Thoughts From My Life
Apr
08

OpenGL and Visual Studio Express 2008

Written by Neil Galloway
 

I recently set up Visual C++ 2008 Express Edition and OpenGL on my Windows XP and Windows Vista computers. I had a few issues, but it is working now. I have a step by step tutorial below and also outlined some of the issues I had.

This is also a guide on just setting up your development environment on Windows for OpenGL programming. If you are like me, I am starting out doing game programming and want to add OpenGL graphics.

The OpenGL tutorials I am using are from NeHe's Website and here is a Visual C++ 2008 and OpenGL Guide I used.

Getting OpenGL to Work With Visual C++ 2008

Follow each step, unless you have already done one of these steps.

1. Install Visual C++ 2008 Express Edition

This is a free C++ IDE from Microsoft that is an excellent tool to start with, if you are interested in programming on a Windows environment.

You can find Visual C++ 2008 on the Visual Studio Express download page on Microsoft's site. It only works on Windows XP and up. If you have an older version of windows you might want to find Visual C++ 2005 and then use this Visual C++ 2005 and OpenGL tutorial.

2. Install Windows SDK for Windows Server 2008 and .NET Framework 3.5

This is the equivalent to the Windows� Server 2003 SP1 Platform SDK that Visual C++ 2005 users installed. It contains the main OpenGL libraries. You can download the Windows SDK for Windows Server 2008 and .NET Framework from the Microsoft website.

The installation will take a little while.

Dell Canada Inc

3. Install the GLUT Libraries

These are additional libraries that come in handy down the road. Some code samples you find may use them, so I find it best to just have them around right off the bat.

GLUT itself is a bit old, but there is another one called freeglut that is a little more actively maintained. I install both of them. Download freeglut from the freeglut SourceForge page. I download the original GLUT from Nate Robins' site.

For both downloads, unzip them and do the following:

  1. Copy all the .h files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\GL folder. This should be glut.h, freeglut.h, freeglut_ext.h, and freeglut_std.h.
  2. Copy all the .lib files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib folder. This should be freeglut.lib and glut32.lib.
  3. Copy all the .dll files into the C:\Windows\system32 folder. This should be freeglut.dll and glut32.dll.

4. Create Your First Project

Create a project in Visual C++ with whatever name you like and set the template as Win32 Project. Click OK.

Click Next on the following screen and you will be taken to Application Settings. Check on Empty Project and then click OK. Your new project has been created.

Declare the dependencies for your project.

  1. Click on Project -> [project name] Properties.
  2. Expand Configuration Properties.
  3. In the Configuration dropdown, select All Configurations.
  4. Select Linker -> Input.
  5. In the Additional Dependencies field, enter in GlU32.Lib OpenGL32.Lib freeglut.lib glut32.lib. Then click OK.

5. Create Your First Source File

I recommend a .cpp file. I recommned downloading the source code from NeHe's Lesson 2 and copying into the file you just created.

Press F7 to compile it and F5 to run it.

It should be working at this point. If not, post a comment and I will try and help out.

Problems Setting Up OpenGL and Visual C++ 2008 Express Edition

Character Set Error

When I try to compile the project, I get the following error:

------ Build started: Project: Test, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(87) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(92) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(99) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [31]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(105) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(109) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(111) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(147) : error C2440: '=' : cannot convert from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(151) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(169) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [94]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(176) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(209) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(212) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(241) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(248) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [35]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(255) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [27]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(262) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(269) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [41]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(281) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(358) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Neil Galloway\My Documents\Visual Studio 2008\Projects\Test\Test\Debug\BuildLog.htm"
Test - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This can be fixed by doing the following:

  1. Project -> [projectname] Properties
  2. In the Configuration dropdown, pick All Configurations.
  3. Expand Configuration Properties.
  4. Select General.
  5. Change the Character Set to be Use Multi-Byte Character Set.

The errors should go away the next time you compile.

Can't Include glaux.h

The first time I compiled, I received the following error:

------ Build started: Project: Test, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(12) : fatal error C1083: Cannot open include file: 'gl\glaux.h': No such file or directory
Build log was saved at "file://c:\Documents and Settings\Neil Galloway\My Documents\Visual Studio 2008\Projects\Test\Test\Debug\BuildLog.htm" Test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This is because the glaux.h has not been added to the include folder. You can do this if you want, but the glaux.h library is old and out dated based on most user comments on the internet. A lot of the examples, especially from NeHe, do not even use the code inside it anymore. I can usually just comment out or remove the

#include 
from the code and it will be fine.

Set Up Dependencies For The Project

When the dependencies are not there, I received the following error trying to compile:

------ Build started: Project: OpenGLTest, Configuration: Debug Win32 ------
Compiling...
WinMain.cpp
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.
Linking...
WinMain.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glHint@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glDepthFunc@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z)
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:\devkitPro\projects\OpenGLTest\Debug\OpenGLTest.exe : fatal error LNK1120: 19 unresolved externals Build log was saved at "file://c:\devkitPro\projects\OpenGLTest\Debug\BuildLog.htm" OpenGLTest - 20 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

To set up OpenGL dependencies for a project, refer to the declaring the dependencies section in Create You First Project section above.

That should fix the problem, try recompiling now.

Change the Application Type

I have also experienced the following error when I compile:

------ Build started: Project: OpenGLTest, Configuration: Debug Win32 ------
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\devkitPro\projects\OpenGLTest\Debug\OpenGLTest.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\devkitPro\projects\OpenGLTest\Debug\BuildLog.htm"
OpenGLTest - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This was caused by not picking the right application type when I created the project. In this example, I chose Win32 Console Application at the startup. To change it, I did the following:

  1. Click on Project -> [project name] Properties.
  2. Expand Configuration Properties.
  3. In the Configuration dropdown, select All Configurations.
  4. Select Linker -> System.
  5. Change the Subsystem field to be Windows (in the case it was Console or try the opposite if it already is Windows). Click OK.

If you enjoyed this post, then make sure you subscribe to my RSS feed or subscribe for email updates. Only one email a day and only if there was a new post.



Related Posts

Win32 Application and Logging To The Console
Time for NDS Homebrew
Keep Text Formatting In HTML Using The pre Tag
Skin Treatment
Visual Appeal At Trade Exhibits

Email this article

Category: Computers

Original Post: Tuesday, April 8th, 2008


121 Comments

Matt Moen Says:
2008-04-09 01:20:53
Very nice tutorial. You are a better writer than me.

As long as you're using OpenGL why not go one step further and make your code portable? Instead of using Windows API look into Simple DirectMedia Layer - it provides basic cross-platform window control, sound, and input. SDL is well maintained and documented with extended libraries for working with compressed image formats, sound mixing, font rendering, network communications, and more.

If you're interested, check out my latest tutorial for setting up SDL and OpenGL in Visual C++.

Neil Galloway Says:
2008-04-09 08:47:39
I will check that out for sure. I am sticking with OpenGL because I am actually doing a coding project for the Nintendo DS and the libnds library has a base set of OpenGL functions to use. I find it easier to code some parts in a windows environment and then port it over to help in learning it.

Christian Mathiesen Says:
2008-05-07 19:20:46
Hey dude thanks a lot man! It freaking gave me such a headache trying to figure out the multi-byte character thing!

Keep up the good work!
Christian

daniel Says:
2008-05-13 08:30:02
thanks for putting up that information, saved me lots of time

Trev Says:
2008-05-16 22:41:24
Hey- I really appreciate you taking the time to write this! Saved me time, and headache!

Joshua Says:
2008-05-21 05:04:58
Thanks for your tutorial. Unfortunately, I got the following error message:

------ Build started: Project: opengltest2, Configuration: Debug Win32 ------
Embedding manifest...
.\Debug\opengltest2.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
Build log was saved at "file://c:\Documents and Settings\Joshua\My Documents\Visual Studio 2008\Projects\opengltest2\Debug\BuildLog.htm"
opengltest2 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Anonymous Says:
2008-05-21 17:49:26
thanks

Joe Says:
2008-06-05 03:19:22
I'm trying to get this to run on my 64bit Vista Business system. The directories are all different of course. How can I make this work?

Allard Says:
2008-06-17 11:01:50
I need freeglut.dll for C# (VCS2008EE) can I use the same file as you used for C++ or where do I find the freeglut.dll file I need?

Anonymous Says:
2008-06-20 05:26:31
if you can find some files on step " 3. Install the GLUT Libraries", you can download from link below

http://cs.selu.edu/~soconnell/freeglut.zip

Anonymous Says:
2008-06-26 11:56:12
Thanks alot, man! I was having alot of trouble with the "MessageBoxW" thing.

carox Says:
2008-06-30 07:19:51
I ran th program :
#include // use as needed for your system
#include
#include
#include
// *************** mylnitt) **************
void mylnit(void)
{
glClearColour(1.0,1.0,1.0,0.0); // set white background colour
gIColour3f(0.0f,0.0f, 0.0f); // set the drawing colour
gIPointSize(4.0); // One 'dot' is a 4 by 4 pixel
gIMatrixMode(GL_PROJECTION);
glLoadldentity();
gluOrtho2D(0.0,800.0,0.0,600.0);
}
// *********************** mylrisplayt) ***********
void myDisplay(void)
{
gIClear(GL_COLOUR_BUFFER_BIT); // clear the screen
gIBegin(GL_OLYGON); //Draw the polygon with the following vertex point
glVertex2i(l00,100);
gIVertex2i(lOO,300);
gIVertex2i(400,300);
gIVertex2i(600,150);
glVertex2i(400,100);
glEnd() ;
glflush();
}// send all output to the display
// ****************** main function ********************
void main(int argc, char** argv)
{
glutInit(&argc, argv) ; // initialise the toolkit
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB); // set display mode
glutInitWindowSize(800,600); // set window size
glutInitWindowPosition( I00,100); // set window position on your screen
glutCreateWindow("OpenGL Window"); // Open the screen window with this name
glutDisplayFunc(myDisplay); // register redraw function
myInit();
glutMainLoop(); // go into a perpetual loop
}

But I am getting the following error:
1>------ Build started: Project: p34_filled polygon, Configuration: Debug Win32 ------
1>Embedding manifest...
1>Project : error PRJ0003 : Error spawning 'mt.exe'.
1>Build log was saved at "file://c:\Program Files\Microsoft Visual Studio\My Projects\p34_filled polygon\p34_filled polygon\Debug\BuildLog.htm"
1>p34_filled polygon - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am not getting the possible error. Can you plz help.

Regards,
Carox.

Joe Piechuck Says:
2008-07-01 22:34:31
Could someone please help me? I can't finish step 3. I cannot find freeglut.lib I downloaded versions 2.2 and 2.4, and I can't find it within either.

dOob InaY Says:
2008-07-07 15:49:34
I did all the steps and when I build the solution for the lesson2, it tell me that plenty of functions are not in the opengl32.dll ? (compilation work)
Thanks

Al Fkaa Says:
2008-08-21 01:36:10
Joe Piechuck: You can find freeglut.lib here: http://users.cs.dal.ca/~sbrooks/csci3161/reference/installingForWindows.NET/index.html

Krisite Says:
2008-09-05 22:31:09
Thanks for this page it has helped alot but I am still getting an error

1>Embedding manifest...
1>.\Debug\example glut.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Users\Kristie\Documents\Visual Studio 2008\Projects\example glut\example glut\Debug\BuildLog.htm"
1>example glut - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


What do I do !! Please help!!

Anonymous Says:
2008-09-05 22:41:42
I fixed the problem above now it's saying this

fatal error C1083: Cannot open include file: 'glut.h': No such file or directory
1>Build log was saved at "file://c:\Users\Kristie\Documents\Visual Studio 2008\Projects\example glut\example glut\Debug\BuildLog.htm"

but it is there i put it there

Toufic Says:
2008-09-07 19:32:17
Great man, thanks a lot!

Joe Says:
2008-09-09 23:35:04
After spending maybe 5 hours trying to get some form of openGL going I found your page and it was the very last tip (changed from window to console) that allowed my sample program to build.

Thank you, and google.

Dwight Says:
2008-09-19 19:47:51
hi I have this problem.
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Dwight Noel\Documents\school\Summer 2008\test\lessons\Debug\lessons.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\Dwight\Documents\school\Summer 2008\test\lessons\Debug\BuildLog.htm"
1>lessons - 2 error(s), 0 warning(s)

Anonymous[2] Says:
2008-10-03 15:51:46
Thanks man, ur site is excellent!!! After searching for weeks, I found ur site. It was like light through a dark tunnel

Anon Says:
2008-10-06 16:05:37
Great site, man. It's helped a lot. Keep up the good work.

SRH Says:
2008-10-13 18:55:22
You've got some good information here... thanks.

I'm still having problems though. This is for a computer graphics class, and this is my first time using Visual C++ (I prefer C#).
Anyway, I tried copying in the sample code from my professor, and I keep getting the following errors:

------ Build started: Project: CGLab, Configuration: Debug Win32 ------
Compiling...
triangle.cpp
c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
d:\program files\microsoft sdks\windows\v6.1\include\gl\glut.h(151) : see declaration of 'exit'
c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : warning C4985: 'exit': attributes not present on previous declaration.
d:\program files\microsoft sdks\windows\v6.1\include\gl\glut.h(151) : see declaration of 'exit'
Build log was saved at "file://c:\Documents and Settings\Solomon\My Documents\Visual Studio 2008\Projects\CGLab\CGLab\Debug\BuildLog.htm"
CGLab - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I haven't had any luck fixing this. Any help would be greatly appreciated.

SRH Says:
2008-10-13 19:15:58
One more thing...

I've noticed that putting #include above #include gives me completely different errors:

------ Build started: Project: CGLab, Configuration: Debug Win32 ------
Compiling...
triangle.cpp
Linking...
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
C:\Documents and Settings\Solomon\My Documents\Visual Studio 2008\Projects\CGLab\Debug\CGLab.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Solomon\My Documents\Visual Studio 2008\Projects\CGLab\CGLab\Debug\BuildLog.htm"
CGLab - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Not sure if that information is helpful...

sen Says:
2008-10-17 20:46:48
I'm a newbie in VC++ express 2008, I started it by selecting the step below ;
File --> New --> Project --> win 32 project --> enter name then ok --> welcome to win 32 application wizard --> I choose next --> check the empty project --> click finish.

After that, I didn't see anything that belong to the text field, I mean only start page so that I couldn't even paste a source code in to the empty project which I've created.

What should I do then ?

Anonymous Says:
2008-10-17 21:00:35
This is for all guys who stuck in Gl.h, Glu.h, GLAUX.h or else. Get it free all the complete library, dll, and header files in http://www.swiftless.com. This link gave me all.
For every body who wants to help me please tell me the way to start my first program. I still couldn't see anything except the start page.

sen Says:
2008-10-17 21:06:35
Here it's the complete link http://www.swiftless.com/tutorials/opengl/gldrivers.html
This web also contain superior guide.
All tutorial is free.
Please help, i can't wait for any longer.
I didn't see anything that belong to the text field, I mean only start page so that I couldn't even paste a source code in to the empty project which I've created.

How to make it rigth ?

sen Says:
2008-10-18 21:55:18
I've already solve my first problem about adding new item (ctrl + shift + A). Now I try to test Nehe's lesson 6 project. After I copied and pasted the source code, I compiled it and got the result below;
------ Build started: Project: TugasOpenGl2, Configuration: Debug Win32 ------
Compiling...
Tugas2.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(17) : warning C4068: unknown pragma
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(374) : warning C4068: unknown pragma
c:\documents and settings\satellite\my documents\visual studio 2008\projects\tugasopengl2\tugasopengl2\tugas2.cpp(41) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen'
Linking...
Embedding manifest...
Build log was saved at "file://c:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\TugasOpenGl2\TugasOpenGl2\Debug\BuildLog.htm"
TugasOpenGl2 - 0 error(s), 3 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
I thought there was no problem, then I press F5 to run it.
But the Error Form tell me that the "Initialization Failed"
After I closed it, there were messages like this ;
'TugasOpenGl2.exe': Loaded 'C:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\TugasOpenGl2\Debug\TugasOpenGl2.exe', Symbols loaded.
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\avgrsstx.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'TugasOpenGl2.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\iglicd32.dll', Binary was not built with debug information.
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\igldev32.dll', Binary was not built with debug information.
'TugasOpenGl2.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'TugasOpenGl2.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
The program '[3920] TugasOpenGl2.exe: Native' has exited with code 0 (0x0).

Please help me !

Aldo Says:
2008-10-26 00:22:22
PROBLEM:
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: símbolo externo _WinMain@16 sin resolver al que se hace referencia en la función ___tmainCRTStartup

How can I resolve it?
please help!
Thaks

huyfamilykhmer Says:
2008-11-20 17:46:53
PROBLEM:
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: símbolo externo _WinMain@16 sin resolver al que se hace referencia en la función ___tmainCRTStartup

You have to add the following text to your project property->Configuration Properties-->Linker>Command Line: Additional options: /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

Hope this will help.

Cheers.

sen Says:
2008-11-21 22:16:36
Hello, it goes wrong again but I don't know where to make it right.
Last time the code that should be no wrong coz I builded it successfully just stuck in type conversion. I mean no pragma use or others. It just my fault that just uses the code without make suitable type.
Now I make my own project that uses bitmap. Finally, I've build it successfully and the compiled result's shown below.
------ Rebuild All started: Project: KungfuPanda, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'KungfuPanda', configuration 'Debug|Win32'
Compiling...
PO.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(17) : warning C4068: unknown pragma
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(374) : warning C4068: unknown pragma
c:\documents and settings\satellite\my documents\visual studio 2008\projects\vc++ project\kungfupanda\kungfupanda\po.cpp(33) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen'
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
LINK : C:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\Debug\KungfuPanda.exe not found or not built by the last incremental link; performing full link
Embedding manifest...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://c:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\KungfuPanda\Debug\BuildLog.htm"
KungfuPanda - 0 error(s), 3 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

This make me very happy, coz this is my first project but something bad appear while I start debuging.
It just like before, I mean while the windows form appear "would you like to run in fullscreen mode", wether I choose yes or no, it just start the appearence then disappear in seconds. Maybe in milliseconds.
What cause this problem. For every one who knows this case, please tell me. How to prevent the result not to disappear while it just start running ? A comment would be a real help. Please try to compile and run the code to see what's going on.
Here's the debugging log
'KungfuPanda.exe': Loaded 'C:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\Debug\KungfuPanda.exe', Symbols loaded.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\avgrsstx.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'KungfuPanda.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\iglicd32.dll', Binary was not built with debug information.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\igldev32.dll', Binary was not built with debug information.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'KungfuPanda.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
The program '[896] KungfuPanda.exe: Native' has exited with code 0 (0x0).
This is my first project code; If I run it should be a rotating box that contain Po bitmap.
#include
#include
#include
#include
#include

HDC hDC=NULL;
HGLRC hRC=NULL;
HWND hWnd=NULL;
HINSTANCE hInstance;

bool keys[256];
bool active=TRUE;
bool fullscreen=TRUE;

GLfloat xrot;
GLfloat yrot;
GLfloat zrot;

GLuint texture[1];

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;

if (!Filename)
{
return NULL;
}

File=fopen(Filename,"r");

if (File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}

return NULL;
}

int LoadGLTextures()
{
int Status=FALSE;

AUX_RGBImageRec *TextureImage[1];

memset(TextureImage,0,sizeof(void *)*1);


if (TextureImage[0]=LoadBMP("Data/DragonWarrior.bmp"))
{
Status=TRUE;

glGenTextures(1, &texture[0]);


glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
}

if (TextureImage[0])
{
if (TextureImage[0]->data)
{
free(TextureImage[0]->data);
}

free(TextureImage[0]);
}

return Status;
}

GLvoid ReSizeGLScene(GLsizei width, GLsizei height)
{
if (height==0)
{
height=1;
}

glViewport(0,0,width,height);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();

// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}

int InitGL(GLvoid)
{
if (!LoadGLTextures())
{
return FALSE;
}

glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
return TRUE;
}

int DrawGLScene(GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-5.0f);

glRotatef(xrot,1.0f,0.0f,0.0f);
glRotatef(yrot,0.0f,1.0f,0.0f);
glRotatef(zrot,0.0f,0.0f,1.0f);

glBindTexture(GL_TEXTURE_2D, texture[0]);

glBegin(GL_QUADS);
// muka depan
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
// muka belakang
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
// muka atas
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
// muka bawah
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
// muka kanan
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
// muka kiri
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glEnd();

xrot+=0.3f;
yrot+=0.2f;
zrot+=0.4f;
return TRUE;
}

GLvoid KillGLWindow(GLvoid)
{
if (fullscreen)
{
ChangeDisplaySettings(NULL,0);
ShowCursor(TRUE);
}

if (hRC)
{
if (!wglMakeCurrent(NULL,NULL))
{
MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
}

if (!wglDeleteContext(hRC))
{
MessageBox(NULL,"Release Rendering Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
}
hRC=NULL;
}

if (hDC && !ReleaseDC(hWnd,hDC))
{
MessageBox(NULL,"Release Device Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hDC=NULL;
}

if (hWnd && !DestroyWindow(hWnd))
{
MessageBox(NULL,"Could Not Release hWnd.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hWnd=NULL;
}

if (!UnregisterClass("OpenGL",hInstance))
{
MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hInstance=NULL;
}
}



BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
GLuint PixelFormat;
WNDCLASS wc;
DWORD dwExStyle;
DWORD dwStyle;
RECT WindowRect;
WindowRect.left=(long)0;
WindowRect.right=(long)width;
WindowRect.top=(long)0;
WindowRect.bottom=(long)height;

fullscreen=fullscreenflag;

hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "OpenGL";

if (!RegisterClass(&wc))
{
MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (fullscreen)
{
DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = width;
dmScreenSettings.dmPelsHeight = height;
dmScreenSettings.dmBitsPerPel = bits;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;


if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL)
{

if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
{
fullscreen=FALSE;
}
else
{

MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP);
return FALSE;
}
}
}

if (fullscreen)
{
dwExStyle=WS_EX_APPWINDOW;
dwStyle=WS_POPUP;
ShowCursor(FALSE);
}
else
{
dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
dwStyle=WS_OVERLAPPEDWINDOW;
}

AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);

// Create The Window
if (!(hWnd=CreateWindowEx( dwExStyle,
"OpenGL",
title,
dwStyle |
WS_CLIPSIBLINGS |
WS_CLIPCHILDREN,
0, 0,
WindowRect.right-WindowRect.left,
WindowRect.bottom-WindowRect.top,
NULL,
NULL,
hInstance,
NULL)))
{
KillGLWindow();
MessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

static PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
bits,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};

if (!(hDC=GetDC(hWnd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!SetPixelFormat(hDC,PixelFormat,&pfd))
{
KillGLWindow();
MessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(hRC=wglCreateContext(hDC)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!wglMakeCurrent(hDC,hRC))
{
KillGLWindow();
MessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

ShowWindow(hWnd,SW_SHOW);
SetForegroundWindow(hWnd);
SetFocus(hWnd);
ReSizeGLScene(width, height);

if (!InitGL())
{
KillGLWindow();
MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

return TRUE;
}

LRESULT CALLBACK WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_ACTIVATE:
{
if (!HIWORD(wParam))
{
active=TRUE;
}
else
{
active=FALSE;
}

return 0;
}

case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}
break;
}

case WM_CLOSE:
{
PostQuitMessage(0);
return 0;
}

case WM_KEYDOWN:
{
keys[wParam] = TRUE;
return 0;
}

case WM_KEYUP:
{
keys[wParam] = FALSE;
return 0;
}

case WM_SIZE:
{
ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));
return 0;
}
}


return DefWindowProc(hWnd,uMsg,wParam,lParam);
}

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
BOOL done=FALSE;


if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
{
fullscreen=FALSE;
}


if (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen))
{
return 0;
}

while(!done)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message==WM_QUIT)
{
done=TRUE;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
else
{
if ((active && !DrawGLScene()) || keys[VK_ESCAPE])
{
done=TRUE;
}
else
{
SwapBuffers(hDC);
}

if (keys[VK_F1])
{
keys[VK_F1]=FALSE;
KillGLWindow();
fullscreen=!fullscreen;
// Recreate Our OpenGL Window
if (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen))
{
return 0;
}
}
}
}

KillGLWindow();
return (msg.wParam);
}

sen Says:
2008-11-21 22:20:32
Hello everyone, please help me.

Anon Says:
2008-12-08 01:16:29
Thank you. You are a life saver.

Radu Says:
2008-12-22 05:01:13
Very important for VISTA 64Bit users: I was trying to set VStudio 2008 on Vista Business 64Bit, and whenever i tried to compile my projects i received an error telling me that glut32.dll was not found. That is because you have to copy it to windows/SysWow64 folder and not to windows/system32 folder !!!

aurora Says:
2008-12-28 10:10:28
Radu or anyone else successfully working with Vista 64bit how the heck did you get around the security cookie issues? I managed to somehow get glut apps to work with Express (it was magic as it never popped up) but now that I'm using a full version on VC2008 neither my express nor my full gets around it.
This is what I always run into starting from the beginning I'll follow the excellent advise above. Create a new project add my code, lets keep its simple and use the NeHe example 2 glut code. Hit F7 and everything is pretty and wonderful. Now hit F5 and this is what happens.
- I get a series of
Unhandled exception at 0x00018bac in gluttest.exe: 0xC0000005: Access violation.

- I hit break and find myself here in gs_support.c
/*
* Initialize the global cookie with an unpredictable value which is
* different for each module in a process. Combine a number of sources
* of randomness.
*/

GetSystemTimeAsFileTime(&systime.ft_struct);
#if defined (_WIN64)
cookie = systime.ft_scalar;
#else /* defined (_WIN64) */
cookie = systime.ft_struct.dwLowDateTime;
cookie ^= systime.ft_struct.dwHighDateTime;
#endif /* defined (_WIN64) */

- specifially on this line
cookie = systime.ft_struct.dwLowDateTime;

- The stack for this is
> gluttest.exe!__security_init_cookie() Line 131 C
gluttest.exe!mainCRTStartup() Line 398 C
kernel32.dll!76d5e3f3()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

Anyone have any clues PLEASE. I've spent eons searching the web and have found nothing that helps.

Aditya Says:
2009-01-10 22:09:13
Thanks a lot !!!
I went through a ton of websites but urs was the most helpful

noha Says:
2009-01-24 08:42:27
hey!
i did all the steps you mentioned about installing glut but it still doesn't work! it says that cannot open "gl/glaux.h" were can i find it?
i didn't find the files freeglut.dll/freeglut.dll
are these necessary files to add?

Iman Says:
2009-01-28 19:56:57
Thanks for your article. I found it very helpful and managed to get it working after digging around for the files.

Seter17 Says:
2009-02-01 16:15:09
Sen, you really sure what your's compilation write?
yoou miss ")" many times!

sitek Says:
2009-02-02 20:21:49
ello sir

i was trying to run program as below by using visual c++ express edition 2008. i also had include all the openGL source into include, lib and bin.

#include
#include
void init();
void RenderScene();

void main()
{
glutInitDisplayMode(GLUT_SINGLE\\GLUT_RGB);
glutCreateWindow(\"Simple\");
init();
glutDisplayFunc(RenderScene);
glutMainLoop();
}

void init()
{
glClearColor(0.0f,0.0f,1.0f,1.0f);
}

void RenderScene()
{
glClear(GL_COLOR_BUFFER_FIT);
glFlush();
}

but sir i get this error and i don\'t know how to solve it...i had followed all your instruction..please help me sir...


1>------ Build started: Project: try, Configuration: Debug Win32 ------
1>Compiling...
1>try.cpp
1>d:\\test\\try\\try.cpp(2) : fatal error C1083: Cannot open include file: \'GL/glut.h\': No such file or directory
1>Build log was saved at \"file://d:\\test\\try\\Debug\\BuildLog.htm\"
1>try - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Bigtallbill Says:
2009-02-12 06:24:40
Excellent work! this has got me started on openGL and C++ development!

Fajar J. Ekaputra Says:
2009-02-14 05:25:43
great article..
thx a lot bro!

Raj Thapa Says:
2009-02-14 13:58:39
i am getting these errors plz help me......

1>------ Build started: Project: project 1, Configuration: Debug Win32 ------
1>Compiling...
1>1.cpp
1>c:\users\raj thapa\documents\visual studio 2008\projects\project 1\project 1\1.cpp(8) : error C2006: '#include' : expected a filename, found 'newline'
1>c:\users\raj thapa\documents\visual studio 2008\projects\project 1\project 1\1.cpp(8) : fatal error C1083: Cannot open include file: '': No such file or directory
1>Build log was saved at "file://c:\Users\rAj tHaPa\Documents\Visual Studio 2008\Projects\project 1\project 1\Debug\BuildLog.htm"
1>project 1 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Delpiero Says:
2009-02-15 22:07:37
Hi
i wish you can help me solve my issue
i am using visual studio 2008 with opengl and i run after modifying the code using F5 but after a couple of times nothing changes my output no matter what i do to the code and it gives me the output from an old unknown build that i dont remember, and i have to close everything all over again and copy paste what iwas workin on
what is the solution to that!!

Piotr Robakowski Says:
2009-02-18 07:21:19
Helo everyone!
I see that most of you are very gut in this topic.
My problem is that I want to create a Windows Forms Application with including OpenGl, but everywere I can olny see haw to create win32 project application. I'm trying to create project using components avilable in Windows Forms in Visual Studio 2008 c++.
Pleassssssse help :)

Anonymous Says:
2009-02-18 11:01:23
can somebody hepl me please??

Anonymous Says:
2009-02-18 11:06:21
sorry for the previous message;
i am trying to to all those steps(in order to start to use opengl), but there is no .dll or .lib file for freeglut.

and one of the codes for opengl works really good(i did not add any freeglut .h,.lib,.dll) but any other sample program codes give errors.
can somebody help me please??

ace_quorthon Says:
2009-02-18 15:07:54
@DelPiero
First use F7 to re-build, then F5 to run.

doofus Says:
2009-02-21 18:09:51
(Compiled & linked just fine.)
I have problems with it running. I get the screen up. But I can't move it anywhere, or resize it.
F1 toggles between full screen and back no problem, but that's it.
All worked great w/2005 express. (on an hp laptop running Vista. But like I said, when I built it w/2005 and ran it on this machine it worked perfectly.)

doofus Says:
2009-02-21 18:45:55
Well, I checked and all my OpenGL apps were locking up or running horribly slow.
I rebooted and now everything is working fine.
I hate crap like that. Wasted a couple of hours over nothing.

Student in Need of Help Says:
2009-02-25 16:42:47
I am getting this error

LINK : fatal error LNK1104: cannot open file 'freeglut.lib'

Can anyone please help me?

vishwas Says:
2009-03-25 10:31:23
im very helpful by this tutorial.but i hav a following error.can anyone find me right.
1>Embedding manifest...
1>mt.exe : general error c10100b1: Failed to load file "..\Debug\vishwas1.exe". The system cannot find the path specified.
1>Build log was saved at "file://c:\Users\VISHWAS\Documents\Visual Studio 2008\Projects\vishwas1\vishwas1\Debug\BuildLog.htm"
1>vishwas1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

bharath Says:
2009-04-25 23:50:57
I needed source code for editors..

VEGETA_DTX Says:
2009-05-06 03:16:14
Hey this site ROCKS! thanx very much for this guide and really all props to you...

BUT! I just have one life wish...I want to meet these SGI/Microsoft guys and to ask them just ONE thing:
"HOW HAAAAARD IS IT!?!?!? HOW HAARRD IS TO PUT EVERYTHING INTO TWO INSTALLATIONS CALLED "Microsoft Visual C++ Installation" and "OpenGL for Microsoft Visual C++ installation" JUST WHAT IS STOPPING YOU FROM DOING THAT?!?!! HOW FREAKING HARD IS IT?!?!?!?!!?!?!?!"

I am really sorry people but I am close to a nervous breakdown for having all these problems...
First I spent whole day searching for the good tutorial ond setting up OpenGL and finally when I found this BRILLIANT site and did everything according to the instructions I had that "fatal error LNK1120: 1 unresolved externals" error and then after I just simply created a new project file, it is gone BUT then the new one came:

1>d:\programs\microsoft visual studio 2008 express edition\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1> c:\program files\microsoft sdks\windows\v6.0a\include\gl\glut.h(146) : see declaration of 'exit'
1>d:\programs\microsoft visual studio 2008 express edition\vc\include\stdlib.h(371) : warning C4985: 'exit': attributes not present on previous declaration.
1> c:\program files\microsoft sdks\windows\v6.0a\include\gl\glut.h(146) : see declaration of 'exit'
1>c:\documents and settings\vegeta\my documents\visual studio 2008\projects\strasno\strasno\strasno.cpp(79) : error C3861: 'exit': identifier not found

Of course all this time I've been trying to compile that suggested NeHe source code.

I would really appreciate any help!

Ivan Says:
2009-05-07 04:50:45
Very nice when I use OprnGL on my laptop with Windows XP !
But if I try to run the same program under Windows Vista with NVIDIA GeForce 8600 graphic board all is OK if I work in full screen mode. If I work in window mode I get only a completely trasparent or white window. Why ? Can you help me ? Thank you.

Anup Says:
2009-05-22 13:22:18
1>------ Build started: Project: Test_vcc, Configuration: Debug Win32 ------
1>Compiling...
1>Test_vcc.cpp
1>.\Test_vcc.cpp(1) : warning C4627: '#include ': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>.\Test_vcc.cpp(2) : warning C4627: '#include ': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>.\Test_vcc.cpp(3) : warning C4627: '#include ': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>.\Test_vcc.cpp(9) : error C2146: syntax error : missing ';' before identifier 'v'
1>.\Test_vcc.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\Test_vcc.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\Test_vcc.cpp(9) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(9) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(9) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(10) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(10) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(10) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(11) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(11) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(11) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(12) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(12) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(12) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(14) : error C2146: syntax error : missing ';' before identifier 'colors'
1>.\Test_vcc.cpp(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\Test_vcc.cpp(14) : error C2086: 'int GLfloat' : redefinition
1> .\Test_vcc.cpp(9) : see declaration of 'GLfloat'
1>.\Test_vcc.cpp(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\Test_vcc.cpp(14) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(14) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(14) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(15) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(15) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(15) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(16) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(16) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(16) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(17) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(17) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(17) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
1>.\Test_vcc.cpp(20) : error C2065: 'va' : undeclared identifier
1>.\Test_vcc.cpp(20) : error C2065: 'vb' : undeclared identifier
1>.\Test_vcc.cpp(20) : error C2065: 'vc' : undeclared identifier
1>.\Test_vcc.cpp(21) : error C2448: 'triangle' : function-style initializer appears to be a function definition
1>.\Test_vcc.cpp(26) : error C2065: 'a' : undeclared identifier
1>.\Test_vcc.cpp(26) : error C2065: 'b' : undeclared identifier
1>.\Test_vcc.cpp(26) : error C2065: 'c' : undeclared identifier
1>.\Test_vcc.cpp(26) : error C2065: 'd' : undeclared identifier
1>.\Test_vcc.cpp(27) : error C2448: 'tetra' : function-style initializer appears to be a function definition
1>.\Test_vcc.cpp(37) : error C2065: 'a' : undeclared identifier
1>.\Test_vcc.cpp(37) : error C2065: 'b' : undeclared identifier
1>.\Test_vcc.cpp(37) : error C2065: 'c' : undeclared identifier
1>.\Test_vcc.cpp(37) : error C2065: 'd' : undeclared identifier
1>.\Test_vcc.cpp(37) : error C2062: type 'int' unexpected
1>.\Test_vcc.cpp(38) : error C2143: syntax error : missing ';' before '{'
1>.\Test_vcc.cpp(38) : error C2447: '{' : missing function header (old-style formal list?)
1>.\Test_vcc.cpp(62) : error C2065: 'GL_COLOR_BUFFER_BIT' : undeclared identifier
1>.\Test_vcc.cpp(62) : error C2065: 'GL_DEPTH_BUFFER_BIT' : undeclared identifier
1>.\Test_vcc.cpp(62) : error C3861: 'glClear': identifier not found
1>.\Test_vcc.cpp(63) : error C3861: 'glColor3d': identifier not found
1>.\Test_vcc.cpp(64) : error C2065: 'GL_COLOR_BUFFER_BIT' : undeclared identifier
1>.\Test_vcc.cpp(64) : error C3861: 'glClear': identifier not found
1>.\Test_vcc.cpp(65) : error C2065: 'GL_TRIANGLES' : undeclared identifier
1>.\Test_vcc.cpp(65) : error C3861: 'glBegin': identifier not found
1>.\Test_vcc.cpp(66) : error C3861: 'divide_tetra': identifier not found
1>.\Test_vcc.cpp(67) : error C3861: 'glEnd': identifier not found
1>.\Test_vcc.cpp(68) : error C3861: 'glFlush': identifier not found
1>.\Test_vcc.cpp(72) : error C3861: 'glViewport': identifier not found
1>.\Test_vcc.cpp(73) : error C2065: 'GL_PROJECTION' : undeclared identifier
1>.\Test_vcc.cpp(73) : error C3861: 'glMatrixMode': identifier not found
1>.\Test_vcc.cpp(74) : error C3861: 'glLoadIdentity': identifier not found
1>.\Test_vcc.cpp(76) : error C2146: syntax error : missing ')' before identifier 'h'
1>.\Test_vcc.cpp(77) : error C2059: syntax error : ')'
1>.\Test_vcc.cpp(79) : error C2146: syntax error : missing ')' before identifier 'w'
1>.\Test_vcc.cpp(80) : error C2059: syntax error : ')'
1>.\Test_vcc.cpp(81) : error C2065: 'GL_MODELVIEW' : undeclared identifier
1>.\Test_vcc.cpp(76) : error C3861: 'glOrtho': identifier not found
1>.\Test_vcc.cpp(79) : error C3861: 'glOrtho': identifier not found
1>.\Test_vcc.cpp(81) : error C3861: 'glMatrixMode': identifier not found
1>.\Test_vcc.cpp(82) : error C3861: 'glutPostRedisplay': identifier not found
1>.\Test_vcc.cpp(87) : error C3861: 'atoi': identifier not found
1>.\Test_vcc.cpp(88) : error C3861: 'glutInit': identifier not found
1>.\Test_vcc.cpp(89) : error C2065: 'GLUT_SINGLE' : undeclared identifier
1>.\Test_vcc.cpp(89) : error C2065: 'GLUT_RGB' : undeclared identifier
1>.\Test_vcc.cpp(89) : error C2065: 'GLUT_DEPTH' : undeclared identifier
1>.\Test_vcc.cpp(89) : error C3861: 'glutInitDisplayMode': identifier not found
1>.\Test_vcc.cpp(90) : error C3861: 'glutInitWindowSize': identifier not found
1>.\Test_vcc.cpp(91) : error C3861: 'glutCreateWindow': identifier not found
1>.\Test_vcc.cpp(92) : error C3861: 'glutReshapeFunc': identifier not found
1>.\Test_vcc.cpp(93) : error C3861: 'glutDisplayFunc': identifier not found
1>.\Test_vcc.cpp(94) : error C2065: 'GL_DEPTH_TEST' : undeclared identifier
1>.\Test_vcc.cpp(94) : error C3861: 'glEnable': identifier not found
1>.\Test_vcc.cpp(95) : error C3861: 'glClearColor': identifier not found
1>.\Test_vcc.cpp(96) : error C3861: 'glutMainLoop': identifier not found
1>Build log was saved at "file://c:\Documents and Settings\Anup\My Documents\Visual Studio 2008\Projects\Test_vcc\Test_vcc\Debug\BuildLog.htm"
1>Test_vcc - 61 error(s), 27 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


i am gettig this error how to get rid of this

Thankful Says:
2009-05-27 17:43:13
Wow, Thanks this helped me so much! :)

nick Says:
2009-08-17 11:51:34
thanks for the help: )

Ryan Says:
2009-08-19 20:50:42
Hey I got a linker error for Glut32.lib after following the steps above. To fix it, I just put the entire absolute path to the .lib file in quotes under linker input :

"C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\Glut32.lib"

checksoft Says:
2009-08-28 02:48:41
really helpful.. many thanks..

eva Says:
2009-09-01 13:38:36
this is the error i got and please help me with this

1>------ Build started: Project: test1, Configuration: Debug Win32 ------
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'C:\Program.obj'
1>Build log was saved at "file://c:\Users\yiwen\Desktop\CourseWork\ComputerGraphic2009Fall\Project\test1\test1\Debug\BuildLog.htm"
1>test1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

ARchana Says:
2009-09-10 09:27:10
Here is the error I get:

PRJ0014 The job object used to control the spawned process has failed. build cannot continiue


Pleas shed some light on this Thanks, Archana

abi Says:
2009-09-11 19:27:31
#include
#include
#include
#include
#include
#include
#include
#include

using namespace std;

struct Vertex
{
double x, y, z;
double nx, ny, nz;
};vector vertices;
struct Face {
int v1, v2, v3;
};
vector faces;
char type;
float x, y, z, nx, ny, nz;
int vid, fid, v1, v2, v3;

void renderScene()
{
glClear(GL_COLOR_BUFFER_BIT);
FILE* f;
f = fopen("C:\Users\Keerthana\Documents\Visual Studio 2008\Projects\myproj\bunny.m", "r");
while ((type=fgetc(f)) != EOF) {
switch (type)
{
case 'V': if (fscanf(f,"Vertex%d %f %f%f{normal=(%f %f %f)}\n", &vid, &x, &y, &z, &nx, &ny, &nz) == 7)
{
Vertex vertex;
vertex.x= x;
vertex.y= y;
vertex.z= z;
vertex.nx= nx;
vertex.ny= ny;
vertex.nz= nz;
vertices.push_back(vertex);
}
break;
case 'F':if (fscanf(f, "Face %d %d%d%d\n", &fid, &v1, &v2, &v3) == 4)
{
Face face;
face.v1 = v1-1;
face.v2 = v2-1;
face.v3 = v3-1;// the index in M is 1-based!
faces.push_back(face);
}
break;
default:do
{
type=fgetc(f);
}
while (type != EOF && type != '\n');
break;
}
}
fclose(f);
/* glBegin(GL_QUADS);
glVertex2f(0,0);
glVertex2f(1,0);
glVertex2f(1,1);
glVertex2f(0,1);
glEnd();*/

glFlush();
}

void main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitWindowPosition(100,100);
glutInitWindowSize(500,500);
glutInitDisplayMode(GLUT_RGBA|GLUT_DEPTH|GLUT_SINGLE);
glutCreateWindow("My Model");
glutDisplayFunc(renderScene);
glutMainLoop();
}




am getting a runtime error
" Expression (stream!=NULL)"

pls help

Peter Says:
2009-09-14 11:11:39
Please help me,, i have this error and dont know how to slove
1>------ Build started: Project: transformation, Configuration: Debug Win32 ------
1>Embedding manifest...
1>.\Debug\transformation.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Users\Cho Poe\Desktop\visual_exe\transformation\transformation\Debug\BuildLog.htm"
1>transformation - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

nafSadh Says:
2009-09-16 16:36:14
This blog is very nice and of real help to me. I found almost everything i tried from this blog work fine.

BIJOY Says:
2009-09-22 20:16:49
Dear Neil
Recently I installed Microsoft Visual C++ Express Edition 2008 Version 9.0 with all the recommended pre-requisites on my computer. I wrote C++ programs in global scope window (Notepad was not used)and successfully compiled and run them in "Start without debugging" window. But I failed to run the programms as .exe files in Microsoft Visual Studio command prompt window. Kindly help me how to do this.
Thanks
BIJOY

MarkM Says:
2009-09-23 20:33:29
wow, just wanted to say that this was a very sweet and succinct tutorial. took me no time at all to be running opengl code. setting this up in eclipse, on the other hand, was a real headache.

cheers!

Michael Vogel Says:
2009-10-01 14:05:31
Thanks for posting this. This helped a lot - I needed to get openGL running for a school programming project.

lmc Says:
2009-10-11 08:37:18
#include
#include

GLfloat ctrlpoints[4][3] = {
{-4.0, -4.0, 0.0}, {-2.0, 4.0, 0.0}, {2.0, -4.0, 0.0}, {4.0, 4.0, 0.0}};

void init(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
glEnable(GL_MAP1_VERTEX_3);
}

void display(void)
{
int i;
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_LINE_STRIP);
for (i=0; i<4; i++)
glEvalCoord1f((GLfloat) i/30.0);
glEnd();
glFlush();
}

void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei)w, (GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w<=h)
glOrtho(-5.0, 5.0, -5.0*(GLfloat)h/(GLfloat)w,
5.0*(GLfloat)h/(GLfloat)w, -5.0, 5.0);
else
glOrtho(-5.0*(GLfloat)w/(GLfloat)h,
5.0*(GLfloat)w/(GLfloat)h, -5.0, 5.0, -5.0, 5.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}

void keyboard(unsigned char key, int x, int y)
{
switch(key){
case 27:
exit(0);
break;
}
}

int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutMainLoop();
return 0;
}


i get the error:

1>------ Build started: Project: msg387, Configuration: Debug Win32 ------
1>Compiling...
1>prog3.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1> c:\program files\microsoft sdks\windows\v6.0a\include\gl\glut.h(146) : see declaration of 'exit'
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : warning C4985: 'exit': attributes not present on previous declaration.
1> c:\program files\microsoft sdks\windows\v6.0a\include\gl\glut.h(146) : see declaration of 'exit'
1>c:\users\end user\documents\visual studio 2008\projects\msg387\msg387\prog3.cpp(46) : error C3861: 'exit': identifier not found
1>Build log was saved at "file://c:\Users\End User\Documents\Visual Studio 2008\Projects\msg387\msg387\Debug\BuildLog.htm"
1>msg387 - 2 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


pls help...
what is the problem?...
thank you!=>

jos Says:
2009-10-28 12:26:30
hello..thanks for the tips,but i stil have a problem
i've downloaded only original glut but when trying to run my project,gives me a message saying that glut32.dll not found..
i've copied it in windows/system32 but it seems that doesn't works...
can you help me?

shams kitz Says:
2009-11-14 20:34:23
Thanks Niel!
Step four was all i needed to make this code work:
http://msdn.microsoft.com/en-us/library/dd369065(VS.85).aspx
using visual studio 2008.

starjumper Says:
2009-11-14 21:22:36
thank you so much... it's always painful for me to try to integrate with visual studio and your careful step-by-step description was exactly what I needed!

karts Says:
2009-11-21 22:44:03
i have the following errors when i try to build my first program called test1 nothing but nehe lesson2

1>------ Build started: Project: test1, Configuration: Debug Win32 ------
1>Embedding manifest...
1>.\Debug\test1.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Karthik\projects\test1\test1\test1\Debug\BuildLog.htm"
1>test1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Anastasia Says:
2009-11-28 10:03:05
THANKS!!!!!! :-)

xora_kho Says:
2009-12-16 23:44:01
22>LINK : fatal error LNK1104: cannot open file 'libARvideod.lib'

abhinav Says:
2009-12-22 13:25:24
All Thanks to u
Amazing tutorial

Anonymous Says:
2010-01-25 04:11:44
I hate you, I thought you saved me but you didn't!!

sukruth Says:
2010-03-03 09:04:09
1>------ Build started: Project: s, Configuration: Debug Win32 ------
1>Embedding manifest...
1>.\Debug\s.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Users\Sai ram\Documents\Visual Studio 2008\Projects\s\s\Debug\BuildLog.htm"
1>s - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



this is d error im gettin pls forward d soln to the mentioned mail id ill b greatfull 2 u.....im using visual studio 2008.......

Anilkumar Says:
2010-04-03 07:17:33
Thanx for the tips man....But i am still gettin same error
like

c:\open\sddf\sddf\sds.cpp(3) : fatal error C1083: Cannot open include file: 'GL/glut.h': No such file or directory
Build log was saved at "file://c:\Open\sddf\sddf\Debug\BuildLog.htm"


Cud u help me out please

Frank Says:
2010-04-06 08:26:16
For those of you getting the error on the "exit" function being redefined, it's because you've been using glut.h included with glut, but you need to use the glut.h that's included in freeglut. Since glut hasn't been updated since 2001 or whatever, some of the headers for standard functions (such as exit) have changed. However, freeglut is much better maintained and is compatible with glut, so just use the glut.h included there.

Shankar Says:
2010-04-08 00:56:55
Thanks...This article helps a lot to build and troubleshoot the OpenGL application

Neil Hughes Says:
2010-04-18 12:53:51
Great tutorial
thanks

Sigh... Says:
2010-04-25 01:02:23
Thanks for this page, if only I had found it earlier!

Also if you are getting the "exit" errors try moving any "#include stdlib.h" lines BEFORE your "#include GL\glut.h" line.

As this page was the only reference to an eror I am getting on one of the glut demos, I thought I might ask here..

"glut general error c10100b1: Failed to load file ".\Release\sysview.exe". The system cannot find the file specified."

Something to do with manifests or sum such? can't work it out, in fact cant figure out what the program is actually for.

ne1?

BTW Stay away from VS2010, it's a bloody pain in the bum, not finished, piece of bloated unwashed dog turd IMHO, and why O why did they move the directories to property sheets, and 101 other little things designed to piss u off...grrr

Eswar Says:
2010-05-05 00:43:02
Hey can u help me out in creating a simple project in opengl using c..??

Jim Digital Designer Says:
2010-05-16 22:59:31
glut32.h does not exist. I presume you mean glut.h (for vcpp 2005 tutorial)

Salim Says:
2010-06-27 03:21:10
You are a very nice writer.

I have completed all the step but an error occurred.

1>------ Build started: Project: TestGL, Configuration: Debug Win32 ------
1>Compiling...
1>testgl.cpp
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'freeglut.lib'
1>Build log was saved at "file://g:\TestGL\TestGL\Debug\BuildLog.htm"
1>TestGL - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

seventh_god Says:
2010-07-22 22:45:29
could anyone help me to use opengl or diretcx in visual basic 2008 ? thanks

seventh_god Says:
2010-07-22 22:47:07
if anyone could help me, please sent me a word at joe_coe99@yahoo.com

aparna Says:
2010-08-13 10:14:41
help me to solve following error
-------------------Configuration: HELLOWIN - Win32 Debug--------------------
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/HELLOWIN.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

HELLOWIN.exe - 2 error(s), 0 warning(s)

abey Says:
2010-08-15 01:13:26
can help me...
i have a problem.

Error 1 fatal error C1083: Cannot open include file: 'GL/wglext.h': No such file or directory d:\file ...\...\window_init.cpp 15 Project

how to include header of GL/wglext.h in to openGL.

i use microsoft visual studio 2008

thanks ..


9emini Says:
2010-08-18 21:06:37
Cheers Neil - got "NeHe's Lesson 2" to execute using VS2008 under win7 x64. No freeglut, and no win7SDK either (as it's huge and I'm impatient! Do have the directXSDK installed tho' [don't shoot me]!) I wonder if the lack of the win7SDK will come back to bite me on the bum...

Finnboy Says:
2010-09-28 10:02:21
Program debugs and runs, but it says that freeglut.dll is missing and closes. What should I do?

Raya Says:
2010-10-07 13:14:17
can anybody help me quickly to solve this error




1>------ Build started: Project: E234_HW1_3, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>main.cpp
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>glew.c
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>glut32.lib(glut_init.obj) : error LNK2005: _glutInitWindowPosition@8 already defined in freeglut.lib(freeglut.dll)
1>glut32.lib(glut_init.obj) : error LNK2005: _glutInitWindowSize@8 already defined in freeglut.lib(freeglut.dll)
1>glut32.lib(glut_init.obj) : error LNK2005: _glutInitDisplayMode@4 already defined in freeglut.lib(freeglut.dll)
1>glut32.lib(glut_win.obj) : error LNK2005: _glutDisplayFunc@4 already defined in freeglut.lib(freeglut.dll)
1>glut32.lib(glut_win.obj) : error LNK2005: _glutReshapeFunc@4 already defined in freeglut.lib(freeglut.dll)
1>glut32.lib(glut_event.obj) : error LNK2005: _glutMainLoop@0 already defined in freeglut.lib(freeglut.dll)
1> Creating library C:\Users\user\Desktop\areej\graphic\E234_HW1_3\Debug\E234_HW1_3.lib and object C:\Users\user\Desktop\areej\graphic\E234_HW1_3\Debug\E234_HW1_3.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Users\user\Desktop\areej\graphic\E234_HW1_3\Debug\E234_HW1_3.exe : fatal error LNK1169: one or more multiply defined symbols found

sarah Says:
2011-01-04 09:52:30
hi.
i have always this msg

1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redéfinition ; __declspec(noreturn) est différent
what i should do/.........
plz replyy

nidhi Says:
2011-01-14 04:29:46
1>Embedding manifest...
1>.\Debug\s.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Users\nidhi\Documents\Visual Studio 2008\Projects\s\s\Debug\BuildLog.htm"
1>s - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

srinivas Says:
2011-01-19 01:30:52
1>------ Build started: Project: my project, Configuration: Debug Win32 ------
1>Linking...
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\srinu\Documents\Visual Studio 2008\Projects\my project\my project\Debug\BuildLog.htm"
1>my project - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

rahul Says:
2011-01-22 07:07:39
I am getting following error -> I am using windows7 64bits.
VS 2008.

I did configuration of the character set to "Multi-Byte Character Set"

Pls tell me, what should I do..
I am not getting any library issue..

1>line.cppn
1>c:\users\ell\documents\visual studio 2008\projects\opengl1\opengl1\line.cpp(117) : error C2440: 'initializing' : cannot convert from 'const char [14]' to 'const LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\ell\documents\visual studio 2008\projects\opengl1\opengl1\line.cpp(128) : error C2664: 'LoadIconA' : cannot convert parameter 2 from 'const LPCWSTR' to 'LPCSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\ell\documents\visual studio 2008\projects\opengl1\opengl1\line.cpp(131) : error C2440: '=' : cannot convert from 'const LPCWSTR' to 'LPCSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\ell\documents\visual studio 2008\projects\opengl1\opengl1\line.cpp(132) : error C2440: '=' : cannot convert from 'const LPCWSTR' to 'LPCSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\ell\documents\visual studio 2008\projects\opengl1\opengl1\line.cpp(149) : error C2664: 'CreateWindowExA' : cannot convert parameter 2 from 'const LPCWSTR' to 'LPCSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

myk Says:
2011-01-27 13:10:07
For Aurora,

gs_support sets up some sort of global buffer overrun security cookie. But since "cookie" is defined as UINT_PTR when the code tries to assign systime.ft_struct.dwLowDateTime value to cookie, you get a buffer overrun because systime.ft_struct.dwLowDateTime is a LONG!! Am I right that this would CAUSE a buffer overrun? If so, I would think the module that handles this would need to be rebuilt. Unfortunately, I don't know enough about how to go about this or if it's possible. Suggestions anyone?

Chrys Says:
2011-02-03 12:17:15
Neil Galloway you are the man
Thank you so much

jeesie Says:
2011-02-07 20:22:17
I got the same error. Please help. I am using w7 vs 2010.

Please help.
"
jos Says:
2009-10-28 12:26:30
hello..thanks for the tips,but i stil have a problem
i've downloaded only original glut but when trying to run my project,gives me a message saying that glut32.dll not found..
i've copied it in windows/system32 but it seems that doesn't works...
can you help me?"

pruthvi Says:
2011-03-01 07:49:03
u should copy that glut32.dll to windows/sysytem folder also try it once u vil get

prashant Says:
2011-03-18 03:51:49
Thanx a ton

ashish Says:
2011-04-09 14:22:00
Thanks a lot Neil.. really helped me to begin with OpenGL.

Anonymous Says:
2011-05-04 11:13:10
1>loadmodels.obj : error LNK2019: unresolved external symbol "int __cdecl LoadBitmap(char *)" (?LoadBitmap@@YAHPAD@Z) referenced in function "void __cdecl loadAll3dmodels(void)" (?loadAll3dmodels@@YAXXZ)
1>C:\Users\7air\Desktop\projecto\Debug\projecto.exe : fatal error LNK1120: 1 unresolved externals
1>

how to fix this pls?

Troy Says:
2011-05-24 19:01:26
You are a genius! I have been trying to compile lesson 6 on Visual C++ Express 2008 using DevIL or glaux replacement with no success. Thanks to this website, I was successful using Glut. Thanks.

farsh Says:
2011-05-25 14:12:52
Thank you! You are my hero! Thanks to you I compiled my first opengl program! Yeah! You're a real man! The whole Internet sucks, your small but informative article kicks its ass!
You brought light to my miserable life! God bless you!
Neil Galloway for president!

kim Says:
2011-05-27 04:56:51
Thanks a lot!

Filip Says:
2011-06-12 20:03:11
Is openGL usable for forms too, or is it just for Win32 programing? (I'm using VC++ 2008).

Filip Says:
2011-06-20 23:20:47
I found out that it is. I haven't got it working yet though, that's next.

ajit gupta Says:
2011-07-08 15:06:20
hi
i am getting this errors and warnings


Warning 1 warning C4005: 'GLUT_API_VERSION' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 107 rcp1
Warning 2 warning C4005: 'GLUT_KEY_F1' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 120 rcp1
Warning 3 warning C4005: 'GLUT_KEY_F2' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 121 rcp1
Warning 4 warning C4005: 'GLUT_KEY_F3' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 122 rcp1
Warning 5 warning C4005: 'GLUT_KEY_F4' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 123 rcp1
Warning 6 warning C4005: 'GLUT_KEY_F5' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 124 rcp1
Warning 7 warning C4005: 'GLUT_KEY_F6' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 125 rcp1
Warning 8 warning C4005: 'GLUT_KEY_F7' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 126 rcp1
Warning 9 warning C4005: 'GLUT_KEY_F8' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 127 rcp1
Warning 10 warning C4005: 'GLUT_KEY_F9' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 128 rcp1
Warning 11 warning C4005: 'GLUT_KEY_F10' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 129 rcp1
Warning 12 warning C4005: 'GLUT_KEY_F11' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 130 rcp1
Warning 13 warning C4005: 'GLUT_KEY_F12' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 131 rcp1
Warning 14 warning C4005: 'GLUT_KEY_LEFT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 132 rcp1
Warning 15 warning C4005: 'GLUT_KEY_UP' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 133 rcp1
Warning 16 warning C4005: 'GLUT_KEY_RIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 134 rcp1
Warning 17 warning C4005: 'GLUT_KEY_DOWN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 135 rcp1
Warning 18 warning C4005: 'GLUT_KEY_PAGE_UP' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 136 rcp1
Warning 19 warning C4005: 'GLUT_KEY_PAGE_DOWN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 137 rcp1
Warning 20 warning C4005: 'GLUT_KEY_HOME' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 138 rcp1
Warning 21 warning C4005: 'GLUT_KEY_END' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 139 rcp1
Warning 22 warning C4005: 'GLUT_KEY_INSERT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 140 rcp1
Warning 23 warning C4005: 'GLUT_LEFT_BUTTON' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 145 rcp1
Warning 24 warning C4005: 'GLUT_MIDDLE_BUTTON' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 146 rcp1
Warning 25 warning C4005: 'GLUT_RIGHT_BUTTON' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 147 rcp1
Warning 26 warning C4005: 'GLUT_DOWN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 148 rcp1
Warning 27 warning C4005: 'GLUT_UP' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 149 rcp1
Warning 28 warning C4005: 'GLUT_LEFT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 150 rcp1
Warning 29 warning C4005: 'GLUT_ENTERED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 151 rcp1
Warning 30 warning C4005: 'GLUT_RGB' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 156 rcp1
Warning 31 warning C4005: 'GLUT_RGBA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 157 rcp1
Warning 32 warning C4005: 'GLUT_INDEX' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 158 rcp1
Warning 33 warning C4005: 'GLUT_SINGLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 159 rcp1
Warning 34 warning C4005: 'GLUT_DOUBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 160 rcp1
Warning 35 warning C4005: 'GLUT_ACCUM' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 161 rcp1
Warning 36 warning C4005: 'GLUT_ALPHA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 162 rcp1
Warning 37 warning C4005: 'GLUT_DEPTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 163 rcp1
Warning 38 warning C4005: 'GLUT_STENCIL' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 164 rcp1
Warning 39 warning C4005: 'GLUT_MULTISAMPLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 165 rcp1
Warning 40 warning C4005: 'GLUT_STEREO' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 166 rcp1
Warning 41 warning C4005: 'GLUT_LUMINANCE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 167 rcp1
Warning 42 warning C4005: 'GLUT_MENU_NOT_IN_USE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 172 rcp1
Warning 43 warning C4005: 'GLUT_MENU_IN_USE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 173 rcp1
Warning 44 warning C4005: 'GLUT_NOT_VISIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 174 rcp1
Warning 45 warning C4005: 'GLUT_VISIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 175 rcp1
Warning 46 warning C4005: 'GLUT_HIDDEN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 176 rcp1
Warning 47 warning C4005: 'GLUT_FULLY_RETAINED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 177 rcp1
Warning 48 warning C4005: 'GLUT_PARTIALLY_RETAINED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 178 rcp1
Warning 49 warning C4005: 'GLUT_FULLY_COVERED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 179 rcp1
Warning 50 warning C4005: 'GLUT_STROKE_ROMAN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 187 rcp1
Warning 51 warning C4005: 'GLUT_STROKE_MONO_ROMAN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 188 rcp1
Warning 52 warning C4005: 'GLUT_BITMAP_9_BY_15' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 189 rcp1
Warning 53 warning C4005: 'GLUT_BITMAP_8_BY_13' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 190 rcp1
Warning 54 warning C4005: 'GLUT_BITMAP_TIMES_ROMAN_10' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 191 rcp1
Warning 55 warning C4005: 'GLUT_BITMAP_TIMES_ROMAN_24' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 192 rcp1
Warning 56 warning C4005: 'GLUT_BITMAP_HELVETICA_10' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 193 rcp1
Warning 57 warning C4005: 'GLUT_BITMAP_HELVETICA_12' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 194 rcp1
Warning 58 warning C4005: 'GLUT_BITMAP_HELVETICA_18' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 195 rcp1
Warning 59 warning C4005: 'GLUT_WINDOW_X' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 227 rcp1
Warning 60 warning C4005: 'GLUT_WINDOW_Y' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 228 rcp1
Warning 61 warning C4005: 'GLUT_WINDOW_WIDTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 229 rcp1
Warning 62 warning C4005: 'GLUT_WINDOW_HEIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 230 rcp1
Warning 63 warning C4005: 'GLUT_WINDOW_BUFFER_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 231 rcp1
Warning 64 warning C4005: 'GLUT_WINDOW_STENCIL_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 232 rcp1
Warning 65 warning C4005: 'GLUT_WINDOW_DEPTH_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 233 rcp1
Warning 66 warning C4005: 'GLUT_WINDOW_RED_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 234 rcp1
Warning 67 warning C4005: 'GLUT_WINDOW_GREEN_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 235 rcp1
Warning 68 warning C4005: 'GLUT_WINDOW_BLUE_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 236 rcp1
Warning 69 warning C4005: 'GLUT_WINDOW_ALPHA_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 237 rcp1
Warning 70 warning C4005: 'GLUT_WINDOW_ACCUM_RED_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 238 rcp1
Warning 71 warning C4005: 'GLUT_WINDOW_ACCUM_GREEN_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 239 rcp1
Warning 72 warning C4005: 'GLUT_WINDOW_ACCUM_BLUE_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 240 rcp1
Warning 73 warning C4005: 'GLUT_WINDOW_ACCUM_ALPHA_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 241 rcp1
Warning 74 warning C4005: 'GLUT_WINDOW_DOUBLEBUFFER' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 242 rcp1
Warning 75 warning C4005: 'GLUT_WINDOW_RGBA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 243 rcp1
Warning 76 warning C4005: 'GLUT_WINDOW_PARENT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 244 rcp1
Warning 77 warning C4005: 'GLUT_WINDOW_NUM_CHILDREN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 245 rcp1
Warning 78 warning C4005: 'GLUT_WINDOW_COLORMAP_SIZE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 246 rcp1
Warning 79 warning C4005: 'GLUT_WINDOW_NUM_SAMPLES' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 247 rcp1
Warning 80 warning C4005: 'GLUT_WINDOW_STEREO' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 248 rcp1
Warning 81 warning C4005: 'GLUT_WINDOW_CURSOR' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 249 rcp1
Warning 82 warning C4005: 'GLUT_SCREEN_WIDTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 251 rcp1
Warning 83 warning C4005: 'GLUT_SCREEN_HEIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 252 rcp1
Warning 84 warning C4005: 'GLUT_SCREEN_WIDTH_MM' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 253 rcp1
Warning 85 warning C4005: 'GLUT_SCREEN_HEIGHT_MM' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 254 rcp1
Warning 86 warning C4005: 'GLUT_MENU_NUM_ITEMS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 255 rcp1
Warning 87 warning C4005: 'GLUT_DISPLAY_MODE_POSSIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 256 rcp1
Warning 88 warning C4005: 'GLUT_INIT_WINDOW_X' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 257 rcp1
Warning 89 warning C4005: 'GLUT_INIT_WINDOW_Y' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 258 rcp1
Warning 90 warning C4005: 'GLUT_INIT_WINDOW_WIDTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 259 rcp1
Warning 91 warning C4005: 'GLUT_INIT_WINDOW_HEIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 260 rcp1
Warning 92 warning C4005: 'GLUT_INIT_DISPLAY_MODE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 261 rcp1
Warning 93 warning C4005: 'GLUT_ELAPSED_TIME' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 262 rcp1
Warning 94 warning C4005: 'GLUT_WINDOW_FORMAT_ID' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 263 rcp1
Warning 95 warning C4005: 'GLUT_HAS_KEYBOARD' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 269 rcp1
Warning 96 warning C4005: 'GLUT_HAS_MOUSE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 270 rcp1
Warning 97 warning C4005: 'GLUT_HAS_SPACEBALL' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 271 rcp1
Warning 98 warning C4005: 'GLUT_HAS_DIAL_AND_BUTTON_BOX' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 272 rcp1
Warning 99 warning C4005: 'GLUT_HAS_TABLET' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 273 rcp1
Warning 100 warning C4005: 'GLUT_NUM_MOUSE_BUTTONS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 274 rcp1
Warning 101 warning C4005: 'GLUT_NUM_SPACEBALL_BUTTONS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 275 rcp1
Warning 102 warning C4005: 'GLUT_NUM_BUTTON_BOX_BUTTONS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 276 rcp1
Warning 103 warning C4005: 'GLUT_NUM_DIALS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 277 rcp1
Warning 104 warning C4005: 'GLUT_NUM_TABLET_BUTTONS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 278 rcp1
Warning 105 warning C4005: 'GLUT_DEVICE_IGNORE_KEY_REPEAT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 279 rcp1
Warning 106 warning C4005: 'GLUT_DEVICE_KEY_REPEAT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 280 rcp1
Warning 107 warning C4005: 'GLUT_HAS_JOYSTICK' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 281 rcp1
Warning 108 warning C4005: 'GLUT_OWNS_JOYSTICK' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 282 rcp1
Warning 109 warning C4005: 'GLUT_JOYSTICK_BUTTONS' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 283 rcp1
Warning 110 warning C4005: 'GLUT_JOYSTICK_AXES' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 284 rcp1
Warning 111 warning C4005: 'GLUT_JOYSTICK_POLL_RATE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 285 rcp1
Warning 112 warning C4005: 'GLUT_OVERLAY_POSSIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 290 rcp1
Warning 113 warning C4005: 'GLUT_LAYER_IN_USE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 291 rcp1
Warning 114 warning C4005: 'GLUT_HAS_OVERLAY' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 292 rcp1
Warning 115 warning C4005: 'GLUT_TRANSPARENT_INDEX' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 293 rcp1
Warning 116 warning C4005: 'GLUT_NORMAL_DAMAGED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 294 rcp1
Warning 117 warning C4005: 'GLUT_OVERLAY_DAMAGED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 295 rcp1
Warning 118 warning C4005: 'GLUT_VIDEO_RESIZE_POSSIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 300 rcp1
Warning 119 warning C4005: 'GLUT_VIDEO_RESIZE_IN_USE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 301 rcp1
Warning 120 warning C4005: 'GLUT_VIDEO_RESIZE_X_DELTA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 302 rcp1
Warning 121 warning C4005: 'GLUT_VIDEO_RESIZE_Y_DELTA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 303 rcp1
Warning 122 warning C4005: 'GLUT_VIDEO_RESIZE_WIDTH_DELTA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 304 rcp1
Warning 123 warning C4005: 'GLUT_VIDEO_RESIZE_HEIGHT_DELTA' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 305 rcp1
Warning 124 warning C4005: 'GLUT_VIDEO_RESIZE_X' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 306 rcp1
Warning 125 warning C4005: 'GLUT_VIDEO_RESIZE_Y' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 307 rcp1
Warning 126 warning C4005: 'GLUT_VIDEO_RESIZE_WIDTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 308 rcp1
Warning 127 warning C4005: 'GLUT_VIDEO_RESIZE_HEIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 309 rcp1
Warning 128 warning C4005: 'GLUT_NORMAL' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 314 rcp1
Warning 129 warning C4005: 'GLUT_OVERLAY' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 315 rcp1
Warning 130 warning C4005: 'GLUT_ACTIVE_SHIFT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 320 rcp1
Warning 131 warning C4005: 'GLUT_ACTIVE_CTRL' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 321 rcp1
Warning 132 warning C4005: 'GLUT_ACTIVE_ALT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 322 rcp1
Warning 133 warning C4005: 'GLUT_CURSOR_RIGHT_ARROW' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 327 rcp1
Warning 134 warning C4005: 'GLUT_CURSOR_LEFT_ARROW' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 328 rcp1
Warning 135 warning C4005: 'GLUT_CURSOR_INFO' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 329 rcp1
Warning 136 warning C4005: 'GLUT_CURSOR_DESTROY' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 330 rcp1
Warning 137 warning C4005: 'GLUT_CURSOR_HELP' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 331 rcp1
Warning 138 warning C4005: 'GLUT_CURSOR_CYCLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 332 rcp1
Warning 139 warning C4005: 'GLUT_CURSOR_SPRAY' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 333 rcp1
Warning 140 warning C4005: 'GLUT_CURSOR_WAIT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 334 rcp1
Warning 141 warning C4005: 'GLUT_CURSOR_TEXT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 335 rcp1
Warning 142 warning C4005: 'GLUT_CURSOR_CROSSHAIR' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 336 rcp1
Warning 143 warning C4005: 'GLUT_CURSOR_UP_DOWN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 337 rcp1
Warning 144 warning C4005: 'GLUT_CURSOR_LEFT_RIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 338 rcp1
Warning 145 warning C4005: 'GLUT_CURSOR_TOP_SIDE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 339 rcp1
Warning 146 warning C4005: 'GLUT_CURSOR_BOTTOM_SIDE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 340 rcp1
Warning 147 warning C4005: 'GLUT_CURSOR_LEFT_SIDE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 341 rcp1
Warning 148 warning C4005: 'GLUT_CURSOR_RIGHT_SIDE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 342 rcp1
Warning 149 warning C4005: 'GLUT_CURSOR_TOP_LEFT_CORNER' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 343 rcp1
Warning 150 warning C4005: 'GLUT_CURSOR_TOP_RIGHT_CORNER' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 344 rcp1
Warning 151 warning C4005: 'GLUT_CURSOR_BOTTOM_RIGHT_CORNER' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 345 rcp1
Warning 152 warning C4005: 'GLUT_CURSOR_BOTTOM_LEFT_CORNER' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 346 rcp1
Warning 153 warning C4005: 'GLUT_CURSOR_INHERIT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 347 rcp1
Warning 154 warning C4005: 'GLUT_CURSOR_NONE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 348 rcp1
Warning 155 warning C4005: 'GLUT_CURSOR_FULL_CROSSHAIR' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 349 rcp1
Warning 156 warning C4005: 'GLUT_RED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 354 rcp1
Warning 157 warning C4005: 'GLUT_GREEN' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 355 rcp1
Warning 158 warning C4005: 'GLUT_BLUE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 356 rcp1
Warning 159 warning C4005: 'GLUT_KEY_REPEAT_OFF' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 361 rcp1
Warning 160 warning C4005: 'GLUT_KEY_REPEAT_ON' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 362 rcp1
Warning 161 warning C4005: 'GLUT_KEY_REPEAT_DEFAULT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 363 rcp1
Warning 162 warning C4005: 'GLUT_JOYSTICK_BUTTON_A' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 365 rcp1
Warning 163 warning C4005: 'GLUT_JOYSTICK_BUTTON_B' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 366 rcp1
Warning 164 warning C4005: 'GLUT_JOYSTICK_BUTTON_C' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 367 rcp1
Warning 165 warning C4005: 'GLUT_JOYSTICK_BUTTON_D' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 368 rcp1
Warning 166 warning C4005: 'GLUT_GAME_MODE_ACTIVE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 373 rcp1
Warning 167 warning C4005: 'GLUT_GAME_MODE_POSSIBLE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 374 rcp1
Warning 168 warning C4005: 'GLUT_GAME_MODE_WIDTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 375 rcp1
Warning 169 warning C4005: 'GLUT_GAME_MODE_HEIGHT' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 376 rcp1
Warning 170 warning C4005: 'GLUT_GAME_MODE_PIXEL_DEPTH' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 377 rcp1
Warning 171 warning C4005: 'GLUT_GAME_MODE_REFRESH_RATE' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 378 rcp1
Warning 172 warning C4005: 'GLUT_GAME_MODE_DISPLAY_CHANGED' : macro redefinition c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 379 rcp1
Error 173 error C2375: 'glutInit' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 384 rcp1
Error 174 error C2375: 'glutInitWindowPosition' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 385 rcp1
Error 175 error C2375: 'glutInitWindowSize' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 386 rcp1
Error 176 error C2375: 'glutInitDisplayMode' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 387 rcp1
Error 177 error C2375: 'glutInitDisplayString' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 388 rcp1
Error 178 error C2375: 'glutMainLoop' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 393 rcp1
Error 179 error C2375: 'glutCreateWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 398 rcp1
Error 180 error C2375: 'glutCreateSubWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 399 rcp1
Error 181 error C2375: 'glutDestroyWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 400 rcp1
Error 182 error C2375: 'glutSetWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 401 rcp1
Error 183 error C2375: 'glutGetWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 402 rcp1
Error 184 error C2375: 'glutSetWindowTitle' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 403 rcp1
Error 185 error C2375: 'glutSetIconTitle' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 404 rcp1
Error 186 error C2375: 'glutReshapeWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 405 rcp1
Error 187 error C2375: 'glutPositionWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 406 rcp1
Error 188 error C2375: 'glutShowWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 407 rcp1
Error 189 error C2375: 'glutHideWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 408 rcp1
Error 190 error C2375: 'glutIconifyWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 409 rcp1
Error 191 error C2375: 'glutPushWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 410 rcp1
Error 192 error C2375: 'glutPopWindow' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 411 rcp1
Error 193 error C2375: 'glutFullScreen' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 412 rcp1
Error 194 error C2375: 'glutPostWindowRedisplay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 417 rcp1
Error 195 error C2375: 'glutPostRedisplay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 418 rcp1
Error 196 error C2375: 'glutSwapBuffers' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 419 rcp1
Error 197 error C2375: 'glutWarpPointer' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 424 rcp1
Error 198 error C2375: 'glutSetCursor' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 425 rcp1
Error 199 error C2375: 'glutEstablishOverlay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 430 rcp1
Error 200 error C2375: 'glutRemoveOverlay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 431 rcp1
Error 201 error C2375: 'glutUseLayer' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 432 rcp1
Error 202 error C2375: 'glutPostOverlayRedisplay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 433 rcp1
Error 203 error C2375: 'glutPostWindowOverlayRedisplay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 434 rcp1
Error 204 error C2375: 'glutShowOverlay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 435 rcp1
Error 205 error C2375: 'glutHideOverlay' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 436 rcp1
Error 206 error C2375: 'glutCreateMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 441 rcp1
Error 207 error C2375: 'glutDestroyMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 442 rcp1
Error 208 error C2375: 'glutGetMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 443 rcp1
Error 209 error C2375: 'glutSetMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 444 rcp1
Error 210 error C2375: 'glutAddMenuEntry' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 445 rcp1
Error 211 error C2375: 'glutAddSubMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 446 rcp1
Error 212 error C2375: 'glutChangeToMenuEntry' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 447 rcp1
Error 213 error C2375: 'glutChangeToSubMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 448 rcp1
Error 214 error C2375: 'glutRemoveMenuItem' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 449 rcp1
Error 215 error C2375: 'glutAttachMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 450 rcp1
Error 216 error C2375: 'glutDetachMenu' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 451 rcp1
Error 217 error C2375: 'glutTimerFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 456 rcp1
Error 218 error C2375: 'glutIdleFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 457 rcp1
Error 219 error C2375: 'glutKeyboardFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 462 rcp1
Error 220 error C2375: 'glutSpecialFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 463 rcp1
Error 221 error C2375: 'glutReshapeFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 464 rcp1
Error 222 error C2375: 'glutVisibilityFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 465 rcp1
Error 223 error C2375: 'glutDisplayFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 466 rcp1
Error 224 error C2375: 'glutMouseFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 467 rcp1
Error 225 error C2375: 'glutMotionFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 468 rcp1
Error 226 error C2375: 'glutPassiveMotionFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 469 rcp1
Error 227 error C2375: 'glutEntryFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 470 rcp1
Error 228 error C2375: 'glutKeyboardUpFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 472 rcp1
Error 229 error C2375: 'glutSpecialUpFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 473 rcp1
Error 230 error C2375: 'glutJoystickFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 474 rcp1
Error 231 error C2375: 'glutMenuStateFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 475 rcp1
Error 232 error C2375: 'glutMenuStatusFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 476 rcp1
Error 233 error C2375: 'glutOverlayDisplayFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 477 rcp1
Error 234 error C2375: 'glutWindowStatusFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 478 rcp1
Error 235 error C2375: 'glutSpaceballMotionFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 480 rcp1
Error 236 error C2375: 'glutSpaceballRotateFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 481 rcp1
Error 237 error C2375: 'glutSpaceballButtonFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 482 rcp1
Error 238 error C2375: 'glutButtonBoxFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 483 rcp1
Error 239 error C2375: 'glutDialsFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 484 rcp1
Error 240 error C2375: 'glutTabletMotionFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 485 rcp1
Error 241 error C2375: 'glutTabletButtonFunc' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 486 rcp1
Error 242 error C2375: 'glutGet' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 491 rcp1
Error 243 error C2375: 'glutDeviceGet' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 492 rcp1
Error 244 error C2375: 'glutGetModifiers' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 493 rcp1
Error 245 error C2375: 'glutLayerGet' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 494 rcp1
Error 246 error C2375: 'glutBitmapCharacter' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 499 rcp1
Error 247 error C2375: 'glutBitmapWidth' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 500 rcp1
Error 248 error C2375: 'glutStrokeCharacter' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 501 rcp1
Error 249 error C2375: 'glutStrokeWidth' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 502 rcp1
Error 250 error C2375: 'glutBitmapLength' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 503 rcp1
Error 251 error C2375: 'glutStrokeLength' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 504 rcp1
Error 252 error C2375: 'glutWireCube' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 509 rcp1
Error 253 error C2375: 'glutSolidCube' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 510 rcp1
Error 254 error C2375: 'glutWireSphere' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 511 rcp1
Error 255 error C2375: 'glutSolidSphere' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 512 rcp1
Error 256 error C2375: 'glutWireCone' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 513 rcp1
Error 257 error C2375: 'glutSolidCone' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 514 rcp1
Error 258 error C2375: 'glutWireTorus' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 516 rcp1
Error 259 error C2375: 'glutSolidTorus' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 517 rcp1
Error 260 error C2375: 'glutWireDodecahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 518 rcp1
Error 261 error C2375: 'glutSolidDodecahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 519 rcp1
Error 262 error C2375: 'glutWireOctahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 520 rcp1
Error 263 error C2375: 'glutSolidOctahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 521 rcp1
Error 264 error C2375: 'glutWireTetrahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 522 rcp1
Error 265 error C2375: 'glutSolidTetrahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 523 rcp1
Error 266 error C2375: 'glutWireIcosahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 524 rcp1
Error 267 error C2375: 'glutSolidIcosahedron' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 525 rcp1
Error 268 error C2375: 'glutWireTeapot' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 530 rcp1
Error 269 error C2375: 'glutSolidTeapot' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 531 rcp1
Error 270 error C2375: 'glutGameModeString' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 536 rcp1
Error 271 error C2375: 'glutEnterGameMode' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 537 rcp1
Error 272 error C2375: 'glutLeaveGameMode' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 538 rcp1
Error 273 error C2375: 'glutGameModeGet' : redefinition; different linkage c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 539 rcp1
Error 274 fatal error C1003: error count exceeds 100; stopping compilation c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\freeglut_std.h 539 rcp1


please help me to get rid or these errors

Sagar Says:
2011-07-20 22:59:55
I got the following error..

1>------ Build started: Project: New, Configuration: Debug Win32 ------
1> Lesson2.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(125): warning C4005: 'WINGDIAPI' : macro redefinition
1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\wingdi.h(30) : see previous definition of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(126): warning C4005: 'APIENTRY' : macro redefinition
1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\windef.h(126) : see previous definition of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(127): warning C4005: 'CALLBACK' : macro redefinition
1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\windef.h(123) : see previous definition of 'CALLBACK'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(128): warning C4005: 'WINAPI' : macro redefinition
1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\windef.h(124) : see previous definition of 'WINAPI'
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(87): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(92): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(99): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [31]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(105): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(109): error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(111): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(147): error C2440: '=' : cannot convert from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(151): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(169): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [94]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(176): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(209): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(212): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(241): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(248): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [35]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(255): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [27]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(262): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(269): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [41]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(281): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(353): warning C4007: 'WinMain' : must be '__stdcall'
1>c:\users\getway\documents\visual studio 2010\projects\new\lesson2.cpp(358): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

shams k Says:
2011-08-05 17:40:47
thanks to this tutorial i was able to resurrect an old project that i had working back in the days of server 2000.

Protip: Make sure you aren't trying to load texture files that are not there.

pierre Says:
2011-09-22 07:27:38
Thank for your tutorial.
I have problem to execute some c++ code using glut + glui on windows 7.
On init I have an exception when I call GLUI_Master.create_glui_subwindow

The same code works on XP.

My code : (this is in a thread in a mexw32 matlab file)
int argc = 1;
char *argv = "empty";
glutInit( &argc, &argv );/**/
glutInitDisplayMode( GLUT_RGBA | GLUT_DOUBLE |GLUT_STENCIL );
glutInitWindowSize( WSIZE, WSIZE );
glutInitWindowPosition( 0, 0 );
main_window = __glutCreateWindowWithExit("Squel Viewer", exit);


// Create GLUI window
glui_window = GLUI_Master.create_glui_subwindow(main_window,GLUI_SUBWINDOW_BOTTOM);

Travis Says:
2011-10-06 10:06:23
I haven't tried out your tutorial yet, but you are a saint for posting it.

vasu Says:
2011-10-29 09:13:39
When i compiled it i got the following errors:

1>------ Build started: Project: w32, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(3538) : warning C4103: 'c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(3839) : warning C4103: 'c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(3937) : warning C4068: unknown pragma
1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(3943) : warning C4068: unknown pragma
1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(3950) : warning C4068: unknown pragma
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1328) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1328) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1329) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1329) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1329) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1328) : see declaration of 'DECLSPEC_NORETURN'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1389) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1389) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1389) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1328) : see declaration of 'DECLSPEC_NORETURN'
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdce.h(369) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdce.h(369) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdce.h(369) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(1328) : see declaration of 'DECLSPEC_NORETURN'
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdcep.h(89) : error C3646: 'I_RpcAllocate' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdcep.h(89) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\rpcdcep.h(89) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\shellapi.h(147) : warning C4103: 'c:\program files\microsoft sdks\windows\v6.0a\include\shellapi.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>c:\program files\microsoft sdks\windows\v6.0a\include\shellapi.h(289) : warning C4103: 'c:\program files\microsoft sdks\windows\v6.0a\include\shellapi.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : error C3646: 'inet_ntoa' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : error C3646: 'gethostbyaddr' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(555) : error C3646: 'gethostbyname' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(555) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(555) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(555) : error C2556: 'int (__cdecl *DECLARE_STDCALL_P(hostent *))(const char *)' : overloaded function differs only by return type from 'int (__cdecl *DECLARE_STDCALL_P(hostent *))(const char *,int,int)'
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(555) : error C2371: 'DECLARE_STDCALL_P' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : error C3646: 'getservbyport' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : error C3646: 'getservbyname' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : error C2556: 'int (__cdecl *DECLARE_STDCALL_P(servent *))(const char *,const char *)' : overloaded function differs only by return type from 'int (__cdecl *DECLARE_STDCALL_P(servent *))(int,const char *)'
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : error C2371: 'DECLARE_STDCALL_P' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(556) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : error C3646: 'getprotobynumber' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(559) : error C3646: 'getprotobyname' : unknown override specifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(559) : error C2091: function returns function
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(559) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(559) : error C2556: 'int (__cdecl *DECLARE_STDCALL_P(protoent *))(const char *)' : overloaded function differs only by return type from 'int (__cdecl *DECLARE_STDCALL_P(protoent *))(int)'
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : see declaration of 'DECLARE_STDCALL_P'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(559) : error C2371: 'DECLARE_STDCALL_P' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(558) : see declaration of 'DECLARE_STDCALL_P'
1>Build log was saved at "file://c:\Vasu\Visual C++ 2008\w32\w32\Debug\BuildLog.htm"
1>w32 - 45 error(s), 7 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Elen Says:
2012-02-09 04:20:37
Great, thank you! Everything works as it should, not many examples are like that :)

Anonymous Says:
2012-03-04 08:25:44
Getting the following error :

1>c:\program files\microsoft visual studio 9.0\vc\include\glut.h(137) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory

jj Says:
2012-08-01 22:09:22
Hi, great step by step. My problem is the linking part. There are the headers I am using:
#include
#include

I have added: opengl32.lib, freeglut.lib, glew.lib. Here is the error of linking I'm getting:

1>main.obj : error LNK2001: unresolved external symbol ___gleUseProgram
1>main.obj : error LNK2001: unresolved external symbol ___gleClear
1>main.obj : error LNK2001: unresolved external symbol ___gleClearColor
1>main.obj : error LNK2001: unresolved external symbol ___gleViewport
I have included the freeglut/glew .h , .lib, .dll into the respective Windows SDK\Include, Lib, System32 dir, respectively.

Krishna Says:
2012-10-27 08:19:19
1>------ Build started: Project: kk, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'GlU32.Lib OpenGL32.Lib freeglut.lib glut32.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Krishna Says:
2012-10-27 08:20:09
1>------ Build started: Project: kk, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'GlU32.Lib OpenGL32.Lib freeglut.lib glut32.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

bayan Says:
2014-09-07 20:00:13
any one can help me plz!
I facing problems with Message-box ,Although I followed all the steps (step by step)
the error :
c:\users\bayan\documents\visual studio 2008\projects\opengl\opengl\first.cpp(315) : error C2065: 'Null' : undeclared identifier
1>c:\users\bayan\documents\visual studio 2008\projects\opengl\opengl\first.cpp(392) : error C2660: 'MessageBoxA' : function does not take 3 arguments
1>Build log was saved at "file://c:\Users\Bayan\Documents\Visual Studio 2008\Projects\openGl\openGl\Debug\BuildLog.htm"
1>openGl - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Add a Comment

Note: Comments will be visible after they have been moderated.
Name:

Email: (Never made public)

Web Page:
(include http:// or https://)
Comment:


Enter Verification (image below):