Hi all.

I have been trying to teach myself a little opengl and I have the Visual C++ 2005 express edition. Now I am sure the the biggest problem is the express part, but I downloaded the windows SDK like another thread suggested. I also used the #pragma command (I know it is is bad practice) Well the linker works butit says that gl.h has syntax errors. So I am very confused. Here is just a simple program I made just to import the files.

#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glu32.lib")

#include "C:\ProgramFiles\MicrosoftSDKs\Windows\v1.0\Include\gl\gl.h"
#include"C:\ProgramFiles\MicrosoftSDKs\Windows\v1.0\Include\gl\glu.h"

void main()
{
}


Yes I know I used a static include as well. I am merely trying to start a simple openGL. Again it says that gl.h has a syntax error on this line.

WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);

debugger says void should be followed by a ;

Any help or is Visual C++ 2005 Express incapable of actually programming openGL?


If this is a dumb question I am sorry but I am new to Graphical programming.

Cheers
BlackManta

Doean anyone have some code that will work with Visual Studio 2005 that uses the open gl libraries. I have the express version and I installed the SDK. Now it says the gl.h file has a syntax error

here is my current (very simple) code

#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glu32.lib")

#include "C:\Program Files\Microsoft SDKs\Windows\v1.0\Include\gl\gl.h"
#include "C:\Program Files\Microsoft SDKs\Windows\v1.0\Include\gl\glu.h"

void main()
{
}

Any tips just to get started would be a REAL help. The only otehr option is using dev C++ and importing the appropriate libraries for that compiler.
Thanks all (Code snibbits are welcome as long as they work!)
cheers
BlackManta

Member Avatar for iamthwee

Yeah use dev-cpp

It should have it's own OpenGL libraries anywhoo?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.