• Advertisement
Sign in to follow this  

Strange Entry Point problem with VC++ 2008 Express Edition

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

If I set the entry point under Project->Project Properties->Linker->Advanced as "WinMain", the application runs fine. However, when I close out the application, it continues to run in the background, or at least that is what the Task Manager is showing. If I do not set an entry point, all is well. This is the same under debug or release. What is causing this? It doesn't matter how simple or complex the app, all do this. I've even compiled other people's code to the same effect. I'm at a loss. I thought that specifying an entry point was required. [looksaround]

Share this post


Link to post
Share on other sites
Advertisement
The entry point setting does not need to be changed. What you're looking for is the "Sybsystem" setting under "Project->Project Properties->Linker->SubSystem".

Share this post


Link to post
Share on other sites
[sarcasm]Well, of course! That is so obvious...[/sarcasm] [oh]

Thanks for that! This was bugging me to no end. In all of the compilers I've used in the past, the entry point was always set to "main". I never would have guessed that the "SubSystem" field had anything to do with this!

Share this post


Link to post
Share on other sites
Quote:
From MSDN article
The /SUBSYSTEM option tells the operating system how to run the .exe file.

The choice of subsystem affects the entry point symbol (or entry point function) that the linker will choose.


Although I'm sure there's more to it than that; I'm fairly certain that visual studio also sets some preprocessor macros and links to different libraries..

Cheers!

Share this post


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

  • Advertisement