Runtime Error R6034 in C# program

1

I'm loading in C# a C++/CLI wrapper dll (to a native C++ dll) and if I compile my tool in release mode I'm getting R6034 runtime error and

A dynamic link library (DLL) initialization failed. (Exception from HRESULT: 0x8007045A).

Scheme:

C# tool ---> reference to C++/CLI wrapper ---> static load (implicit) native C++ dll (Additional Dependencies -> lib file)

It seems that something is wrong with the loading process of the C++ library (but I don't have problems in Debug Mode)!

Any hints or ideas!?

Thx

c#
c++
dll
c++-cli
runtime-error
asked on Stack Overflow Jul 13, 2012 by leon22

2 Answers

0

Do you have a release build of the .lib file when running the release build of your app? If not then your release build will not be loading the debug versions of dlls to satisfy the .lib hence the application will not run.

answered on Stack Overflow Jul 13, 2012 by Oliver Clancy
0

Build the release build with symbols, then debug it in the C++ debugger.

answered on Stack Overflow Oct 15, 2012 by Ben

User contributions licensed under CC BY-SA 3.0