🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I need help on a part from the open GL book

Started by
0 comments, last by Dragon2k1 22 years, 6 months ago
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.
Advertisement
Recreate your project as a Win32 Application not a Win32 Console application.

[Resist Windows XP''s Invasive Production Activation Technology!]

This topic is closed to new replies.

Advertisement