[PyQt] SIP: Struggling to build multiple C++ classes for one python module.

Christoff Kok christoff.kok at ex-mente.co.za
Mon May 5 14:49:51 BST 2014


Hi,

I am struggling to get my multiple C++ classes (each in their own .sip
file) to build for the same module. The documentation is not helping me
enough yet.

Currently I am testing with 2 classes: Entity and NamedEntity
 Entity.sip and NamedEntity.sip's first line of code = "%Module emsim"
When I try build it with my setup.py script, the following error appears:
"
D:\Ex Mente\Software\ExMente.Sim 4 Prototypes\EMSIM4\EMSIM4Py>python
setup.py install
running install
running build
running build_ext
building 'emsim' extension
C:\Python33\sip.exe -c build\temp.win32-3.3\Release -b
build\temp.win32-3.3\Release\Entity.sbf -I C:\Python33\sip "D:\...
...\Entity.sip"
C:\Python33\sip.exe -c build\temp.win32-3.3\Release -b
build\temp.win32-3.3\Release\NamedEntity.sbf -I C:\Python33\sip "D:\\...
...\NamedEntity.sip"
sip: Entity.sip:2: Module is already defined
error: command 'C:\Python33\sip.exe' failed with exit status 1
"

When I remove the %Module line in NamedEntity, I receive an error that
there is no %Module defined for the class. When I make NamedEntity's
%Module line a %ConsolidateModule, I received the same "Module is already
defined' error as described above.

I am sure I am missing something or understanding the Module /
ConsolidateModule concept wrong.

-- 
Christoff Kok
Software Engineer
Ex Mente

http://www.ex-mente.co.za
christoff.kok at ex-mente.co.za
PO Box 10214
Centurion
0046
South Africa
tel: +27 12 743 6993
tel: +27 12 654 8198
fax: +27 85 150 1341
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140505/e9c33631/attachment.html>


More information about the PyQt mailing list