Hi,<br><br>I am a beginner as well. May be helpful to check my step-by-step note about the hello SIP tst:<br><br><a href="http://cid-a6597afda81373ba.spaces.live.com/blog/cns!A6597AFDA81373BA!1260.entry">http://cid-a6597afda81373ba.spaces.live.com/blog/cns!A6597AFDA81373BA!1260.entry</a><br>
<br>It is on Mac though, but I think it should work on Windows, just need to set the VC projects.<br><br>zhang<br><br><div class="gmail_quote">On Thu, Sep 16, 2010 at 4:50 PM, Mico Siahaan <span dir="ltr"><<a href="mailto:mico.siahaan@gmail.com">mico.siahaan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Dear all,<br><br>I am learning SIP and I made simple source like this:<br><br>//spam.cpp<br>
<br>#include "spam.h"<br><br>int spam_system(const char *command);<br><br>int main(int argc, char **argv )<br>{<br> spam_system(argv[1]);<br>
        return 0;<br>}<br><br>int spam_system(const char *command)<br>{<br>       int sts;<br>      sts = system(command);<br>        return sts;<br>}<br><br><br>spam.h is in the same folder of spam.cpp and containing:<br><br>// spam.h<br>#include <cstdlib><br>

<br>int spam_system(const char *command);<br><br><br>Then I made simple setup.py:<br><br>from distutils.core import setup, Extension<br>import sipdistutils<br><br>setup(<br>  name = 'spam',<br>  version ='0.1',<br>

  ext_modules = [<br>    Extension("spam", ["spam.sip", "spam.cpp"])<br>    ],<br>  cmdclass = {'build_ext': sipdistutils.build_ext}<br> )<br><br>with spam.sip:<br><br>/* Define the SIP wrapper to the spam library. */<br>

<br>%Module spam 0<br><br>%ModuleHeaderCode<br>#include "spam.h"<br>%End<br><br>int spam_system(const char *command);<br><br><br>Then run 'python.exe setup.py build'. But then I got error messages<br><br>

spam.sip(6) : fatal error C1083: Cannot open include file: 'spam.h': No such file or directory<br>error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2<br>

<br>My question: where shall I put spam.h then so sip can compile it successfully? How is the best structure of building python binding with sip? And sorry for the long email.<br><font color="#888888"><br>-- <br>Mico | <a href="mailto:mico.siahaan@gmail.com" target="_blank">mico.siahaan@gmail.com</a> | @bangmico<br>

<br>
</font><br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br>