[QScintilla] Linker error in QScintilla python bindings

Andre Alexander Bell pyqt at andre-bell.de
Tue Jun 3 15:26:03 BST 2008


Hello,

I've received a mail by Stefan Bisplinghoff, to copy as a test the 
moc_qsci*.obj files from the QScintilla\Qt4\release directory to the 
Python directory and manually add them to the generated Makefile in 
QScintilla\Python. After that the linker error were gone and I even 
could start Eric with that QScintilla Python binding. This is the same 
as statically linking QScintilla.

Therefore, I thought there must be some error with my compiled version 
of the QScintilla library. I then tried compiling the QScintilla 
example, which works fine. I then tried the Qt4 native examples, which 
work fine. Afterwards I started the same examples from their PyQt 
counterpart, which work fine too. Still I get the linker error in the 
QScintilla python binding.

Now I've tried the same on another machine. Windows XP, MS Visual Studio 
.Net 2003 instead of 2008, again Qt4.4 same error.

--- 8< ---
C:\Programme\QScintilla\Python>python configure.py -c
QScintilla 2.2.1-snapshot-20080309 is being used.
PyQt 4.4.3-snapshot-20080601 is being used.
Qt v4.4.0 free edition is being used.
SIP 4.7.7-snapshot-20080530 is being used.
The QScintilla module will be installed in
C:\Programme\Python\Lib\site-packages\PyQt4.
The QScintilla API file will be installed in 
C:\Programme\Qt4\qsci\api\python.
The QScintilla .sip files will be installed in 
C:\Programme\Python\sip\PyQt4.
Generating the C++ source for the Qsci module...
Creating the Makefile for the Qsci module...

C:\Programme\QScintilla\Python>nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c -nologo -Zm300 -O2 -MD -W3 -w34100 -w34189 -DUNICODE 
-DWIN32 -DQT_
LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I. 
-IC:\Pro
gramme\Qt4\include -IC:\Programme\Python\include 
-IC:\Programme\Qt4\mkspecs\defa
ult -IC:\Programme\Qt4\include\QtCore -IC:\Programme\Qt4\include\QtGui 
-Fo @C:\D
OKUME~1\ADMINI~1\LOKALE~1\Temp\nm78.tmp
sipQscipart0.cpp
        link /NOLOGO /DLL /INCREMENTAL:NO /OUT:Qsci.pyd 
@C:\DOKUME~1\ADMINI~1\LO
KALE~1\Temp\nm79.tmp
   Creating library Qsci.lib and object Qsci.exp
sipQscipart0.obj : error LNK2001: unresolved external symbol "public: 
static str
uct QMetaObject const QsciScintilla::staticMetaObject" 
(?staticMetaObject at QsciSc
intilla@@2UQMetaObject@@B)

[...]


Qsci.pyd : fatal error LNK1120: 28 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
--- 8< ---


Andre Alexander Bell schrieb:
> I've just tried to upgrade my installation to the most recent 
> snapshots of Qt library, SIP, PyQt, QScintilla, and Eric versions. I'm 
> running MS Visual Studio 2008 on Windows XP and have proceeded in the 
> order given in the Eric manual. I had no problem in compiling Qt, SIP, 
> QScintilla, and PyQt. I can run all Qt native example apps. I can run 
> sip. I can import PyQt4 in python.
> After this worked well, I tried to continue and compile the QScintilla 
> python binding. However, when compiling I receive the following linker 
> error:
>
> [...] I've been reading the docs, searched the mailinglist archive and 
> the web, but could not figure out, why it fails.
> Did I miss anything? Can you give me a pointer, where to find an 
> answer, why the compilation fails?



More information about the QScintilla mailing list