[PyKDE] Re: compiling pyqt under windows.

Grzegorz Dostatni grzegorz at ee.ualberta.ca
Wed Mar 10 16:38:01 GMT 2004


Cheers again.
I fixed my last problem. It went away when I started fresh with qt, pyqt
and sip.

I still have two questions:
1. If I compile qt statically, the configure step on sip fails. It cannot
find the libraries anymore. (I am using configure.py -k).
2. When I compile qt as a dynamic library, and everything else (sip and
pyqt) as static libraries, the compile step finishes without errors.  I've
tried to recompile python and add the libraries to the executable, but the
instructions are geared towards unix installation, not windows.  I still
get errors when compiling:

\Python-2.3.3\PC\config.c(121) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(122) : error C2065: 'initqtext' : undeclared
identifier
\Python-2.3.3\PC\config.c(122) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(123) : error C2065: 'initqtgl' : undeclared
identifier
\Python-2.3.3\PC\config.c(123) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(124) : error C2065: 'initqtnetwork' : undeclared
identifier
\Python-2.3.3\PC\config.c(124) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(125) : error C2065: 'initqtsql' : undeclared
identifier
\Python-2.3.3\PC\config.c(125) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(126) : error C2065: 'initqttable' : undeclared
identifier
\Python-2.3.3\PC\config.c(126) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(127) : error C2065: 'initqtui' : undeclared
identifier
\Python-2.3.3\PC\config.c(127) : error C2099: initializer is not a
constant
\Python-2.3.3\PC\config.c(128) : error C2065: 'initqtxml' : undeclared
identifier
\Python-2.3.3\PC\config.c(128) : error C2099: initializer is not a
constant


My guess the libraries are not loaded properly and those symbols are not
visible. Any suggestions?

Greg


"Many a man may look respectable, and yet be able to hide at will behind a
	spiral staircase."
				- Pelham (Plum) Grenville  Wodehouse


On Tue, 9 Mar 2004, Grzegorz Dostatni wrote:

>
> Cheers.
>
> First the environment. Windows XP, Visual Studio.NET, qt3.2.3, sip3.10 and
> pyqt3.10.  Python 2.3.3
>
> I am trying to compile a static version of python with qt compiled into
> it.
>
> I've compiled python, qt as a static library and sip.
> When I try to configure pyqt (just the configure step) I get these error
> messages:
>
> qui.lib(qwidgetfactory.obj) : error LNK2001: unresolved external symbol
> "private
> : static struct QStringData * QString::shared_null"
> (?shared_null at QString@@0PAUQ
> StringData@@A)
> qui.lib(database.obj) : error LNK2001: unresolved external symbol
> "private: stat
> ic struct QStringData * QString::shared_null"
> (?shared_null at QString@@0PAUQString
> Data@@A)
> qui.lib(domtool.obj) : error LNK2019: unresolved external symbol "private:
> stati
> c struct QStringData * QString::shared_null"
> (?shared_null at QString@@0PAUQStringD
> ata@@A) referenced in function "public: static class QVariant __cdecl
> DomTool::e
> lementToVariant(class QDomElement const &,class QVariant const &,class
> QString &
> )"
> (?elementToVariant at DomTool@@SA?AVQVariant@@ABVQDomElement@@ABV2 at AAVQString@@@
> Z)
> qui.lib(qwidgetfactory.obj) : error LNK2001: unresolved external symbol
> "class Q
> Application * qApp" (?qApp@@3PAVQApplication@@A)
> qui.lib(moc_database2.obj) : error LNK2001: unresolved external symbol
> "class QA
> pplication * qApp" (?qApp@@3PAVQApplication@@A)
> qui.lib(qwidgetfactory.obj) : error LNK2001: unresolved external symbol
> "public:
>  static char * QSqlDatabase::defaultConnection"
> (?defaultConnection at QSqlDatabase
> @@2QADA)
> qui.lib(database.obj) : error LNK2001: unresolved external symbol "public:
> stati
> c char * QSqlDatabase::defaultConnection"
> (?defaultConnection at QSqlDatabase@@2QAD
> A)
> qui.lib(qwidgetfactory.obj) : error LNK2001: unresolved external symbol
> "public:
>  static class QString QString::null" (?null at QString@@2V1 at A)
> qui.lib(domtool.obj) : error LNK2001: unresolved external symbol "public:
> static
>  class QString QString::null" (?null at QString@@2V1 at A)
> modtest.exe : fatal error LNK1120: 4 unresolved externals
>
>
> Sip compiles without errors or warnings.  The
> c:\python-2.3.2\lib\site-packages directory is in the pythonpath and the
> libsip.lib is in there.
>
> Please help.
>
> Greg
>
> "Many a man may look respectable, and yet be able to hide at will behind a
> 	spiral staircase."
> 				- Pelham (Plum) Grenville  Wodehouse
>
>
>




More information about the PyQt mailing list