[PyQt] pyqtdeploy

Phil Thompson phil at riverbankcomputing.com
Sun Jul 13 15:39:57 BST 2014


On 13/07/2014 3:04 pm, Andrea Peter wrote:
> Hi,
> I'm having some problems deploying my PyQt4/python2.7 project.
> My OS is Fedora20.
> 
> I've installed pyqtdeploy v0.4 and the development version
> v0.5-preview-2664a71fb643,
> I've got the same problems with both.
> 
> What works:
> I installed pyqtdeploy (with python3.3 and PyQt5)
> I can build the pyqtdeploy project, I got a build directory with all
> resources, main.c and other stuff, and of course main.pro
> 
> Problems:
> 
> 1)
> In main.pro I've got a line which says
> 
> LIBS += -L/home/.../lib/python2.7/site-packages/PyQt4
> -L/home/.../python2.7/site-packages *-lQtNetwork_s **-lQtGui_s -lQt_s
> -lQtSql_s *-lsip *-lQtCore_s*
> 
> what are those *_s libraries?
> After running qmake (qt4) I have them in the makefile and it complains
> (cannot find -lQtGui_s) because it doesn't find them,
> it finds them without the trailing _s indeed (e.g. libQtGui.so).
> 
> workaround:
> /What I can do is delete those -l*_s items from main.pro but I'm not
> sure at all this is a good idea//(see errors at the end)/
> 
> 2)
> Two lines after (in main.pro) I've got
> 
> LIBS += -L/home/.../pyqtdeploy *-lpython2*
> 
> Here again there isn't any libpython2.so library, but there's a
> libpython2.7.so library indeed
> 
> workaround:
> /I guess I simply have to replace 2 with 2.7, I'm quite confident this
> is a valid workaround/correction/
> 
> 
> So after applying the two workarounds on the main.pro file, when
> running make I have
> 
> main.o:(.data+0x8): undefined reference to `initQtNetwork'
> main.o:(.data+0x18): undefined reference to `initQtGui'
> main.o:(.data+0x28): undefined reference to `initQt'
> main.o:(.data+0x38): undefined reference to `initQtSql'
> main.o:(.data+0x48): undefined reference to `initsip'
> main.o:(.data+0x58): undefined reference to `initQtCore'
> collect2: error: ld returned 1 exit status
> 
> (Note: main.c has been generated by pyqtdeploy)
> 
> I cannot find these functions anywhere, is this possibly becuase of
> the missing -l*_s libraries?

You need to build a static version of PyQt.

Phil


More information about the PyQt mailing list