Jump to content
  • Advertisement
Sign in to follow this  
goochie

Cannot compile C++ projects in Visual Studio 2005

This topic is 3688 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

Woo, first post. I'm teaching myself C++ on the advice of some professional game developers I've met, and after searching around here I've decided to start by making some 2D game using HGE. Unfortunately, and this is a problem I've had when trying to follow another tutorial for D3D programming, I cannot get Visual Studio to successfully compile these projects. I'm getting the following errors: LNK2019: unrsolved external symbol _WinMain@16 referenced in function __tmainCRTStartup (under "File" it says MSVCRTD.lib) LNK1120: 1 unresolved externals (under "File" it is my program executable) I haven't been able to find much about this __tmainCRTStartup thing, and what's more I have two projects using code from that Direct3D tutorial I mentioned. One can compile and run just fine, but the other (which uses code copied and pasted from the tutorial) also gets these errors. Even when I copy the working project's code into the nonworking one's code, I still get the errors. I'm using Visual Studio 2005 Professional SP1, HGE 1.81, and running Vista Business 64-bit SP1 Any help is appreciated! I've finally found something that I think will help me learn the language in the way I want to do it and now Visual Studio is being a PITA about it :P

Share this post


Link to post
Share on other sites
Advertisement
The linker is looking for a main function called WinMain, which it can't find. You need to provide that if you have your subsystem set to WINDOWS. If you have main() the subsystem should probably be set to CONSOLE. If you didn't want the console window, provide a WinMain() function and set the subsystem to WINDOWS (in Project Properties -> Linker -> System).

Share this post


Link to post
Share on other sites
Thanks for the quick reply! Now that you mentioned it, I noticed I forgot to capitalize the "M." At least now I understand the error...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!