Strange Entry Point problem with VC++ 2008 Express Edition

Started by
3 comments, last by MarkS 14 years, 3 months ago
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]

No, I am not a professional programmer. I'm just a hobbyist having fun...

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".
[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!

No, I am not a professional programmer. I'm just a hobbyist having fun...

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!
Again, thank you.

No, I am not a professional programmer. I'm just a hobbyist having fun...

This topic is closed to new replies.

Advertisement