I'd like to get started using OpenGL with Visual C++ 2005 Express Edition. I've installed VC++ and the PSDK. I've tried to start a new Win32 application, and here's the exent of my code:
// OpenGL Stuff 2.cpp : Defines the entry point for the console application.
//
#include
"stdafx.h"#include
<GL/gl.h> int _tmain(int argc, _TCHAR* argv[]) {return 0;}The error returned when I try to "Build -> Build OpenGL Stuff 2" is as follows:
c:\documents and settings\mfunke\my documents\visual studio 2005\projects\opengl stuff 2\opengl stuff 2\opengl stuff 2.cpp(5) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory
Where can I get the right include files Any help you can lend would be greatly appreciated.

Visual C++ 2005 Express Edition with OpenGL -- Can't get started
Tillmann
An easier method instead of copying is to create a link to all your includes using the junction program from sysinternals.com
http://www.sysinternals.com/Utilities/Junction.html
It works in the same way "symbolic links" work on *NIX systems. it includes source code as well as an executable on the above web page. I think the program can link networked files and directories as well.
Using this will save space on your drive since your not copying dirs/files, your just making a junction/link.
Kent McCroskey
All right -- I made a PlatformSDK directory under Microsoft Visual Studio 8\VC and copied the Bin, Include, and Lib directories from
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
to
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
... as suggested by the article you pointed me to. The minimal program above now generates 143 errors; I'll include the first few for you, since they all seem to be caused by the same thing:
c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\gl.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Here's line 1152 of the indicated file:
WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);
My guess is that it doesn't recognize the identifiers WINGDIAPI or APIENTRY. Is there another include file that I'm missing
Ola Sprauten
DR_CHAOS
WallyLawless
Error 1 fatal error C1083: No such file or directory
any idea
falconair
Brilliant! Thank you so very much for all your help! I can hardly wait to get started on trying to learn OpenGL!
(I only wish I could return the favor.)
Jinnyminto
DPOMT
Did you install the PSDK at "C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK"
see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=7004&SiteID=1 for a similar issue.
Kolokolov
I am having similar problem. the error I get is
1>c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1> c:\program files\microsoft visual studio 8\vc\include\gl\glut.h(140) : see declaration of 'exit'
1>c:\documents and settings\vruser\desktop\hww\hww\hww\hww.cpp(62) : error C2264: 'exit' : error in function definition or declaration; function not called
1>Build log was saved at "file://c:\Documents and Settings\VRUSER\Desktop\hww\hww\hww\Debug\BuildLog.htm"
1>hww - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========