2

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:

  • It uses boost.
  • it is c++/clr
  • it references another Project which is written in c# and uses some classes from it. The Platform target of this Project is set to "x64".
  • it uses curl
  • it uses vmware vddk (which is a C Library)

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]

marc40000
  • 3,167
  • 9
  • 41
  • 63
  • Does the Windows 7 machine/image have the .net version that your program is written in? i think its 4.5+ that is included with Windows 8+ and Windows 7 only comes with 3.5 – Daniel Park Feb 01 '14 at 00:47
  • Clearly you've checked if Win7 is x64... asking just in case... – Alexei Levenkov Feb 01 '14 at 00:56
  • Have you tried re-installing the C++ Redist package? I've done some searching and some people with similar issues have indicated that the C++ redist DLLs didn't seem to be installed correctly. [link] (http://www.bitdefender.com/support/how-to-solve-error-message-%22the-application-was-unable-to-start-correctly-(0x000007b)-click-ok-to-close-the-application%22-1106.html) or [link](http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/the-application-was-unable-to-start-correctly/16765d09-bc69-4ebb-8471-54b1fa176ba1) – AnthonyBCodes Feb 01 '14 at 00:58
  • 1
    Something about your Windows 7 machine seems to be screwed up. Try uninstalling your redists and re-installing them from scratch. Also ensure that your Windows target version (_WIN32_WINNT) 0x0601 or higher. – Collin Dauphinee Feb 01 '14 at 01:26
  • I don't think it's the machines. I tried several of them. I tried installing the vc redists myself as well as with McRip VC Redist Installer. The Project Targets the .net 4.0 runtime, I used the 4.5 installer on the target machines. Also the installed windowses are all x64. I also tried running it elevated with admin rights: That also results in this error. – marc40000 Feb 01 '14 at 13:18

1 Answers1

3

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:

Using boost in CLR

Boost Threads with CLR

boost mutex C++/CLI problems

http://lists.boost.org/threads-devel/2009/10/0502.php

Community
  • 1
  • 1
marc40000
  • 3,167
  • 9
  • 41
  • 63
  • Thanks for not being this guy! It's definitely harder to track down this issue when it doesn't occur on Windows 8. http://xkcd.com/979/ – Rotsiser Mho Jul 04 '14 at 07:19