Hi all, I'm Francesco and that's my first post here. As stated in the subject, I'm having trouble compiling an existing C++ project (an MFC app with many other libraries linked) with the /clr flag. I'm using VS08 sp1 and Win7 64 bit and framework 3.5.
The projects compiles succesfully, but trying to launch (both in release and in debug) I get an error message:
"Application Error : The application was unable to start correctly (0xc000007b)."
I tried to google for the error, someone suggests to run sfc /scannow to repair a possible system problem, but it doesn't find anything wrong.
Many thanks in advance,
I'd like to use some of the .NET features (in particular WPF) from within the app. It seems to be some compatibility issue with one of the libraries used in the project: any chances that someone has encountered a similar problem before?
I tried to recompile the project removing any reference to .NET assemblies and the few lines of WPF code that I added, basically the project is now the original C++/MFC, just compiled with /clr flag active: I get the same error as soon as the app starts, so I guess it's some sort of compatibility issue with one of the libraries I'm using. I'll try to figure out which one is.
It's perfectly possible and acceptable to use the .NET framework with MFC...I did it for quite a while before migrating all my apps to full WPF/Silverlight.
Mixing WPF with MFC may present some challenges. Both are entire GUI systems handling handling native Window handles and associated messaging etc. To have them run simultaneously in the same process? I don't know...
Well I tried to add WPF controls in other MFC projects with apparently no problems, anyway it seems not to be a WPF issue cause the problem rises just activating the /clr compilation on the original C++ project.
We're successfully doing this now (Migrated existing MFC app to WPF and still using MFC in places). We did not switch /clr on everywhere -- for one it would generate IL for ALL our C++ code which would slow down a lot of things. So, we only add /clr on files which have C++/CLI code.