Skip to main content
GameDev.net gamedev.net
🔒 Locked

Hello World!

Started by Monkey with a spanner Jul 19, 2003 at 10:53 PM 2 replies 300+ views
Original Post
Monkey with a spanner
Monkey with a spanner
Hi I''ve just bought Sams Teach Yourself C++ in 21 Days, the version that comes with Visual C++ 6 Introductory Edition. I''m stuck on the first Hello World exercise, when I try and build my program I get this error: --------------------Configuration: Example 1 - Win32 Debug-------------------- Compiling... ex1.cpp Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/Example 1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Example 1.exe - 2 error(s), 0 warning(s) ------------------------------------------------------------------------------------------------ Is this because Visual C++ can''t find the libraries to link my source code to? Can somebody help me? I followed all of the instructions exactly.
Nairb
Nairb
Hey,
When you create your project, select Win32 Console Application. You selected Win32 Application, which uses WinMain instead of main and has some other significant differences.

--Brian
Ratterbox
Ratterbox
It is probably because you have chosen to create a Win32 Application, in which the entry point for the application is _WinMain. Try creating the example under a Win32 Console, in which the entry point is _main. To create a console go File->New, Win32 Console.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.