Link a C++/CLI DLL to a Qt C++ application

1

There is a dynamic library mylib.dll written in C++ and compiled with Visual Studio, with common language runtime (/clr) support, that exports a function:

bool __declspec(dllexport) exported_func();

And there is a Qt C++ application that links to this library. mylib.lib is added to the project's .pro file.

LIBS += mylib.lib

Problem: Application compiles well. But just on start of run, it crashes without even entering main function. Path to mylib.dll is added to PATH environment variable, and is loaded just before the crash.

Crash message:

Exception thrown at 0x000007FEE18831E7 in app.exe: 0xC0000005: Access violation executing location 0x000007FEE18831E7.

No more information, even in call stack.

Why?

c++
windows
qt
c++-cli
clr
asked on Stack Overflow Jan 3, 2019 by Ali

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0