Reputation: 3198
I have a Project in VC2013 x64 which compiles successfully. It also runs without any Problems on Win8, but crashes immediately before reaching main() on Win7 with the message:
"The application was unabel to start correctly (0x000007b). click OK to Close the application."
I already tried installing all vc runtimes there are. I tried it on several Win7 and Win8 Systems and it's always the same.
I'm not sure what could cause this, I also don't know which details about the projects might be important to figure the issue out. I wrote mayn Programs in VC before and never had such an issue. That's why I didn't check if the program runs on non-win8 pc during development, since my dev machine currently is win8. I'll post a few facts about this solution, maybe that info helps:
Also, the same happens if I install VC2013 on a win7 pc. It compiles perfectly but doesn't run on Win7 and crashes with the same message. I also tried swithing to the vc2012 toolset which results in the same Crash.
If you have any idea what could cause this, please post. I'm happy for even ideas that could cause this.
Thx Marc
[edit] I just tried adding
#define _WIN32_WINNT _WIN32_WINNT_WIN7
#include <WinSDKVer.h>
in front of
#include <SDKDDKVer.h>
in targetver.h . It still crashes with that error. [/edit]
Upvotes: 2
Views: 378
Reputation: 3198
Ha! I found it! It was the boost libraries having some issue when compiled without /clr but linked to a program that uses /clr. The workaround I used is linking boost dynamically by using
#define BOOST_THREAD_DYN_LINK
globally and putting the corresponding dlls in the work dir of the process. There is more to read about this, it seems to be an old Problem. The new Thing seems to be that it runs on Win8 anyways. The links I found just report it doesn't work at all, maybe they haven't tried it on Win8:
http://lists.boost.org/threads-devel/2009/10/0502.php
Upvotes: 3