1

I tried to build my first C# wrapper for a simple qt dynamic lib. And it works fine until I use some qt classes like QString in dll. Then System.DllNotFoundException appears:

"The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

It seems like .net wrapper can't find some dependencies. How should I build the qt dll in the right way?

Good one:

extern "C" QT_TESTLIBSHARED_EXPORT double func(double a, double a);

double func(double a, double a){
    return a+b;
}

Bad one:

extern "C" QT_TESTLIBSHARED_EXPORT QString func(Qstring str);

QString func(Qstring str){
    return str;
}
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Kanarsky
  • 162
  • 1
  • 10
  • See [Passing strings from C# to C++ dll and back](http://stackoverflow.com/questions/20752001/passing-strings-from-c-sharp-to-c-dll-and-back-minimal-example). – Dmitry Sokolov Apr 16 '15 at 11:46

0 Answers0