How can I use several Qt based dlls in an external application?

In order to use several dlls created with Qt in an external application, you need to do the following:

  • ensure that only one QCoreApplication/QApplication instance exists, by checking if qApp [doc.qt.nokia.com] exists before creating the application instance.
  • export the dlls using __declspec(dllexport)
  • if your Qt based dlls depend on different versions of Qt, you need to ensure that the right ones are picked up for each dll by configuring Qt with the qtlibinfix and namespace options [doc.qt.nokia.com] to ensure that each dll has a unique name and to avoid symbol conflicts:

  1. configure -qtlibinfix customName -qtnamespace theNamespace

No comments

Write a comment

Sorry, you must be logged in to post a comment.