Friday, 15 March 2013

c++ - Error when trying to execute Qt app from shared library -


I am trying to execute a simple QT app from other languages ​​(Target Java). My app looks like this:

  //HelloWorld.pro TEMPLATE = lib target = HelloWald QT = core GUI widgets source = + main.cpp  

C ++ source

  //main.cpp # include & lt; QApplication & gt; Int main (int argc, char ** argv) {QApplication app (argc, argv); Return app.exec (); }  

I compiled it with QMake but every time I try to load a shared library, I get segmentation error 11.

  // PS: Simplify code to load shared library from Python CTIP import * cdll.LoadLibrary ('libHelloWorld.dylib'). Main ()  

I do not know where the problem is.

PS: My goal is to communicate with QT5 in Java via JNI / JNA


No comments:

Post a Comment