try this:
#ifdef WIN32
#include <windows.h>
#endif
Now I myself still can’t compile under VC++ 6 with openGL, but I can compile
the nehe sdl opengl lessons with the downloaded vc workspace. If i try to
make my own workspace for the same code, I cant compile, it gives errors
concerning opengl functions e.g
asd.obj : error LNK2001: unresolved external symbol _gluPerspective at 32
So I just use one of the nehe workspaces and add files to make my own
project.
The problem is now I get compiler errors if I put class declerations in
header files
The syntax is correct, because the same files worked in another app. The
problem is with the application/setup, not the class.
In the bsp.h file:
class bsp {
public:
bspdata_t bspdata;
bsp(char* fileName);
~bsp();
};
And when I compile:
e:\ngendev\bsp.h(356) : error C2061: syntax error : identifier 'bsp’
e:\ngendev\bsp.h(356) : error C2059: syntax error : ';'
e:\ngendev\bsp.h(356) : error C2449: found ‘{’ at file scope (missing
function header?)
e:\ngendev\bsp.h(407) : error C2059: syntax error : '}'
bsprender.cpp
Error executing cl.exe.
lesson10.exe - 4 error(s), 0 warning(s)
Does anyone know whats happening?> ----- Original Message -----
From: David MacCormack [mailto:djm@maccormack.net]
Sent: Thursday, April 19, 2001 1:07 PM
To: sdl at mail.lokigames.com
Subject: [SDL] Q: Win32 link error _WinMainCRTStartup…
Hi there. I’m trying to compile the simple example app under
Visual C++ 6.
#include "SDL.h"
int main(int argc, char** argv) {
return 0;
}
I’ve followed all of the steps in VisualC.html, added the
include/lib paths, added sdl.lib and sdlmain.lib to the list of libs, set
to compile as Multithreaded DLL, etc… though I get the following error
upon build:
unresolved external symbox _WinMainCRTStartup.
Anyone seen this one before?
Dave
David MacCormack
djm at maccormack.net