Advertisement Jump to content


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


Compiling Error

This topic is 6323 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. Does anyone know why I get the error: --------------------Configuration: Window-Basic - Win32 Debug-------------------- Compiling... Window-Basic.cpp Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Window-Basic.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Window-Basic.exe - 2 error(s), 0 warning(s) ----------------------------------------------------------------- This comes up, when I compile a basic window. (The code is from ''Windows Game Programming For Dummies'') Are one of my libraries missing? Oh, and by the way. I''m using MSVC++6. (Yes, the code has been modified to: winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH)

Share this post

Link to post
Share on other sites
You have probably created a Win32 Console App project, instead of an Win32 Windowed App project.

The default entry point in a console app is ''main'', while it is ''WinMain'' in a windowed app.

Just create a new project, and be sure to select Windowed App as the project type, then add all your c/cpp files to it and compile again.

Share this post

Link to post
Share on other sites
Thanks loads Dactylos.
It always amazes me how newbies like myself, can make such simple errors.

Anyway, the code works GREAT!
so thanks again.
Much appreciated.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!