I need help on a part from the open GL book
Hey guys, I just bought the open GL book and I managed to compile the code, but it wont link and form an executable.
Here''s the code:
#define WIN32_LEAN_AND_MEAN //Trim Libraries
#include //main Windows headers
//the main entry point to your program
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdline, int nShowCmd)
{
//Show a very simple message box with the text "Hello world!" displayed
MessageBox(NULL, "\tHello, world!", "My First Windows Application", NULL);
return 0;
}
The error when linking to an exe is:
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/oi.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
oi.exe - 2 error(s), 0 warning(s)
This code is from the Open GL Game Programming book.
Recreate your project as a Win32 Application not a Win32 Console application.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement