Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dragon2k1

I need help on a part from the open GL book

This topic is 6194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!