[PyQt] Compiling SIP example
Pim Schellart
P.Schellart at student.science.ru.nl
Fri Apr 17 17:39:40 BST 2009
Dear Users/Developers,
After failing to compile a simple hello world program with SIP I tried
to compile the simple C++ example from the website: http://www.riverbankcomputing.com/static/Docs/sip4/sipref.html#a-simple-c-example
I created the files using copy paste and followed the instructions to
the letter but I still get the same error when invoking make:
c++ -c -pipe -fPIC -Os -Wall -W -I. -I/Applications/scisoft/i386/
Packages/Python-2.5.2/Python.framework/Versions/2.5/include/python2.5 -
o sipwordcmodule.o sipwordcmodule.cpp
c++ -c -pipe -fPIC -Os -Wall -W -I. -I/Applications/scisoft/i386/
Packages/Python-2.5.2/Python.framework/Versions/2.5/include/python2.5 -
o sipwordWord.o sipwordWord.cpp
c++ -headerpad_max_install_names -bundle -F/Applications/scisoft//i386/
library/Frameworks -framework Python -o word.so sipwordcmodule.o
sipwordWord.o -lword
ld: library not found for -lword
collect2: ld returned 1 exit status
make: *** [word.so] Error 1
Does anybody have any idea what is going on?
It looks like it is searching for the library named word but that is a
bit strange since this is exactly the library which we are attempting
to build.
If I try the same example with distutils using the setup.py file from
the same manual I get:
python setup.py build
/Applications/scisoft/i386/library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/distutils/dist.py:263: UserWarning: Unknown
distribution option: 'versione'
warnings.warn(msg)
running build
running build_ext
building 'word' extension
/Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/bin/sip -c build/temp.macosx-10.4-i386-2.5 -b build/
temp.macosx-10.4-i386-2.5/word.sbf word.sip
creating build/temp.macosx-10.4-i386-2.5/build
creating build/temp.macosx-10.4-i386-2.5/build/temp.macosx-10.4-i386-2.5
cc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/include/python2.5 -I/Applications/
scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/include/
python2.5 -c build/temp.macosx-10.4-i386-2.5/sipwordcmodule.cpp -o
build/temp.macosx-10.4-i386-2.5/build/temp.macosx-10.4-i386-2.5/
sipwordcmodule.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
cc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/include/python2.5 -I/Applications/
scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/include/
python2.5 -c build/temp.macosx-10.4-i386-2.5/sipwordWord.cpp -o build/
temp.macosx-10.4-i386-2.5/build/temp.macosx-10.4-i386-2.5/sipwordWord.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
word.sip:8:18: error: word.h: No such file or directory
sipwordWord.cpp: In function ‘PyObject* meth_Word_reverse(PyObject*,
PyObject*)’:
sipwordWord.cpp:21: error: ‘Word’ was not declared in this scope
sipwordWord.cpp:21: error: ‘sipCpp’ was not declared in this scope
sipwordWord.cpp: In function ‘void release_Word(void*, int)’:
sipwordWord.cpp:61: error: expected type-specifier before ‘Word’
sipwordWord.cpp:61: error: expected `>' before ‘Word’
sipwordWord.cpp:61: error: expected `(' before ‘Word’
sipwordWord.cpp:61: error: ‘Word’ was not declared in this scope
sipwordWord.cpp:61: error: expected primary-expression before ‘>’ token
sipwordWord.cpp:61: error: expected `)' before ‘;’ token
sipwordWord.cpp: In function ‘void* init_Word(sipWrapper*, PyObject*,
sipWrapper**, int*)’:
sipwordWord.cpp:78: error: ‘Word’ was not declared in this scope
sipwordWord.cpp:78: error: ‘sipCpp’ was not declared in this scope
sipwordWord.cpp:86: error: expected type-specifier before ‘Word’
sipwordWord.cpp:86: error: expected `;' before ‘Word’
sipwordWord.cpp:92: error: expected initializer before ‘*’ token
sipwordWord.cpp:94: error: ‘a0’ was not declared in this scope
sipwordWord.cpp:96: error: expected type-specifier before ‘Word’
sipwordWord.cpp:96: error: expected `;' before ‘Word’
error: command 'cc' failed with exit status 1
Kind regards,
Pim Schellart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1590 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090417/9c1ee3c1/smime-0001.bin
More information about the PyQt
mailing list