[PyQt] Linking Qt statically into a project using embedded Python
gwg at emss.co.za
Wed Feb 4 11:58:24 GMT 2009
My project that I am currently working on is a cross-platform C++ project. On Linux 32-bit/64-bit I have the constraint that I MUST link Qt (4.3.3) in statically with the project. This is a given and cannot be compromised. I have successfully embedded Python into our application and with this facility I can run external Python *.py files. With the help of Sip/PyQt used in these *.py files I can route the output to a nice window inside my Qt application etc. etc. But,....the problem is that it only works if I link Qt in dynamically to my application.
The reason(I think - when I link dynamically to Qt) is because my application loads the Qt *.so file dynamically when I startup the application. Then when the application runs an external *.py file and it has the line "from PyQt import QtCore" then I suppose that it sees the *.so is already loaded and uses it. Now my question: How can I either get the Python mechanism or Sip/PyQt to rather use the statically linked in Qt with my project?
Currently, if I link Qt statically into my application and run the *.py files I get some strange Qt message on the command line and then it crashes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt