[PyQt] Linker errors - seems like its not recognizing QtCore and QtGui?

Chandrakant Gopalan chandrakant.gopalan at pinogy.com
Tue Apr 19 01:02:16 BST 2016


Hello,
I am getting linker errors after pyqtdeploy generates the pro file and I run qmake, then nmake.

The pro file looks like this:

...
CONFIG += console warn_off
CONFIG -= app_bundle
QT += widgets
...

SOURCES = pyqtdeploy_main.cpp pyqtdeploy_start.cpp pdytools_module.cpp
DEFINES += PYQTDEPLOY_FROZEN_MAIN PYQTDEPLOY_OPTIMIZED
HEADERS = pyqtdeploy_version.h frozen_bootstrap.h frozen_main.h

INCLUDEPATH += C:/Users/cgopalan/pyqtdeploy/sysroot-win/include/python3.4
LIBS += -LC:/Users/cgopalan/pyqtdeploy/sysroot-win/lib/python3.4/site-packages/PyQt5 -lQt -lQtCore -lQtGui -lQtWidgets
LIBS += -LC:/Users/cgopalan/pyqtdeploy/sysroot-win/lib/python3.4/site-packages -lsip
LIBS += -LC:/Users/cgopalan/pyqtdeploy/sysroot-win/lib -lpython34
...


So the pro file does seem to know that Qt libraries are included. But I am getting errors like:

pyqtdeploy_start.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QByteArray __thiscall QString::toUtf8(void)const & " (__imp_?toUtf8 at QString@@QGBE?AVQByteArray@@XZ) referenced in function "int __cdecl append_path_dirs(struct _object *,char const * *)" (?append_path_dirs@@YAHPAU_object@@PAPBD at Z)
pdytools_module.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QByteArray __thiscall QString::toLatin1(void)const & " (__imp_?toLatin1 at QString@@QGBE?AVQByteArray@@XZ) referenced in function _qrcimporter_get_code
QtCore.lib(sipQtCoreQAbstractProxyModel.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QItemSelection::QItemSelection(class QItemSelection &&)" (__imp_??0QItemSelection@@QAE@$$QAV0@@Z) referenced in function _meth_QAbstractProxyModel_mapSelectionToSource

Any idea what I seem to be doing wrong? Would appreciate the help.

Thanks
Chandrakant


More information about the PyQt mailing list