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

Phil Thompson phil at riverbankcomputing.com
Thu Apr 21 15:29:30 BST 2016


On 19 Apr 2016, at 7:45 pm, Chandrakant Gopalan <chandrakant.gopalan at pinogy.com> wrote:
> 
> One thing i noticed is that it says "dllimport". Does that mean I need Qt DLLs? If so where should they be located? Somewhere within SYSROOT?

qmake knows where the Qt libraries are installed. If the qmake generated Makefile can't find them then that implies there is something wrong with your Qt installation.

There is nothing special about SYSROOT, it is just a covenient way of keeping all platform specific things together.

Phil

> 
> ----- Original Message -----
> From: "Chandrakant Gopalan" <chandrakant.gopalan at pinogy.com>
> To: "pyqt" <pyqt at riverbankcomputing.com>
> Sent: Monday, April 18, 2016 8:02:16 PM
> Subject: [PyQt] Linker errors - seems like its not recognizing QtCore and	QtGui?
> 
> 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
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list