<div dir="ltr">Phil, thanks again. It works and works quite well for us.<div><br></div><div>Kind Regards,</div><div>Christoff</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 May 2014 17:03, Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 05/05/2014 2:49 pm, Christoff Kok wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Hi,<br>
<br>
I am struggling to get my multiple C++ classes (each in their own .sip<br>
file) to build for the same module. The documentation is not helping<br>
me enough yet.<br>
<br>
Currently I am testing with 2 classes: Entity and NamedEntity<br>
 Entity.sip and NamedEntity.sip's first line of code = "%Module<br>
emsim"<br>
When I try build it with my setup.py script, the following error<br>
appears:<br>
"<br>
<br></div>
D:Ex MenteSoftwareExMente.Sim 4 PrototypesEMSIM4EMSIM4Py><u></u>python<div class=""><br>
setup.py install<br>
running install<br>
running build<br>
running build_ext<br>
building 'emsim' extension<br></div>
C:Python33sip.exe -c buildtemp.win32-3.3Release -b<br>
buildtemp.win32-3.<u></u>3ReleaseEntity.sbf -I C:Python33sip "D:...<br>
...Entity.sip"<br>
C:Python33sip.exe -c buildtemp.win32-3.3Release -b<br>
buildtemp.win32-3.<u></u>3ReleaseNamedEntity.sbf -I C:Python33sip "D:\...<br>
...NamedEntity.sip"<div class=""><br>
sip: Entity.sip:2: Module is already defined<br></div>
error: command 'C:Python33sip.exe' failed with exit status 1<div class=""><br>
"<br>
<br>
When I remove the %Module line in NamedEntity, I receive an error that<br>
there is no %Module defined for the class. When I make NamedEntity's<br>
%Module line a %ConsolidateModule, I received the same "Module is<br>
already defined' error as described above.<br>
<br>
I am sure I am missing something or understanding the Module /<br>
ConsolidateModule concept wrong.<br>
</div></blockquote>
<br>
Forget about consolidated modules - that's advanced stuff.<br>
<br>
As far as SIP is concerned there is one logical .sip file per Python module. You can break it into multiple actual .sip files and use the %Include directive much like you would use #include in C/C++.<br>
<br>
If you are going to use one .sip file per class then it's best to have another "master" .sip file that contains stuff not related to any particular class (like the %Module directive) and have %Include directives for each of the individual class .sip files.<br>

<br>
Phil<br>
______________________________<u></u>_________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.<u></u>com/mailman/listinfo/pyqt</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">Christoff Kok</span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">Software Engineer</span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">Ex Mente</span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)"><a href="http://www.ex-mente.co.za/" style="color:rgb(0,0,0);text-decoration:none;outline:none;font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)" target="_blank">http://www.ex-mente.co.za</a><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<a href="mailto:christoff.kok@ex-mente.co.za" style="color:rgb(0,0,0);text-decoration:none;outline:none;font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)" target="_blank">christoff.kok@ex-mente.co.za</a><span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)"> </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">PO Box 10214 </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">Centurion </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">0046 </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">South Africa </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">tel: +27 12 743 6993 </span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">tel: +27 12 654 8198</span><br style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;font-size:14.44444465637207px;background-color:rgb(255,255,255)">fax: +27 85 150 1341</span>

</div>