Search This Blog

Monday, June 22, 2009

Qt deployment with Qt Creator

The installation or deployment of Qt Application with shared library, it just needs to:
  1. Copy the .exe file
  2. And put the required .dll file in the same directory of your .exe file (e.g. QtCore.dll, QtNetwork.dll)
Some problems (Under Windows):

The procedure entry point _Z21qRegisterResourceDataiPKhS0_S0 could not be located in the dynamic link library QtCore4.dll

The weird thing is that QtCore4.dll is in the same directory of the .exe file. So what is the error? Just as it said, the QtCore4.dll does not contain the symbol!
Solution: make sure to copy the right QtCore4.dll
  1. Search the Qt SDK install directory, find the RIGHT QtCore4.dll
  2. In this specific example, do not get the QtCore4.dll under C:\Qt\2009.02\bin,
    but in the Qt directory. E.g. C:\Qt\2009.02\qt\bin
  3. Find the QtCore4.dll and QtGui4.dll there, and mingwm10.dll might be needed there if this is a LGPL version.
If you are using Linux/UNIX:
Try ldd command, this cool program list all the dependencies for your executable
For example, ldd your_program_ , it might output => /usr/local/lib/qt4/ (0x800648000) => /lib/ (0x80099e000) => /usr/local/lib/ (0x800ab2000) => /usr/local/lib/ (0x800bb6000) => /usr/local/lib/ (0x800d71000) => /usr/lib/ (0x800f6b000) => /lib/ (0x801176000) => /lib/ (0x801296000) => /lib/ (0x8013a4000) => /lib/ (0x8014bc000) => /lib/ (0x8016f5000) => /usr/local/lib/ (0x801809000) => /usr/local/lib/ (0x801912000)

No comments: