Sign in to follow this  
MarkS

Strange Entry Point problem with VC++ 2008 Express Edition

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
[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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this