PDA

View Full Version : won't compile



mindspin
03-30-2005, 04:02 PM
I'm using the following code just to see

#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h> #include <gl\glaux.h>

int main()
{
return 0;
}

I have all the header files.

I get:

sample01 error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

&

sample01 fatal error LNK1120: 1 unresolved externals

Am I missing something?

Supercamel
03-30-2005, 04:44 PM
it compiles alright for me. what compiler are you using?

mindspin
03-30-2005, 05:00 PM
I'm using visual sutdio 6.0 (c++) the built in compiler.

Supercamel
03-30-2005, 05:05 PM
i am using dev C++ (only cause its free) and it works fine. for me there was a warning about puting includes on the same line.

Gong
03-30-2005, 05:07 PM
You should create a "Win32 Console" project.

Supercamel
03-30-2005, 05:17 PM
change it from int main() to WinMain()

int main is only for consol apps and you included windows.