just a quick update about this in case someone else wandered about it.<br><br>I gave up trying to get boost.python to work with Python.&nbsp; I&#39;m sure it would if I could get mingw to build Python, but the only project I could find that was supporting this (the Python source needs to be modified apparently) doesn&#39;t do so any more since several releases of Python because the windows libraries supplied by python &quot;should&quot; be compatible. And they are, just not with 
boost.python built with mingw for some reason.<br><br>So it ended up being way to much trouble to try and get boost.python to work and I switched to Swig.<br><br>Swig works great, the cmake support could be better but there&#39;re no problems with linking to the Python libs.
<br><br>Of course some people might say that one should stick with msvc for compiling stuff on windows because everything (is forced to) support it, and it&#39;s free like beer.&nbsp; Though when using free Qt you have to use mingw, no way around that.&nbsp; But that ain&#39;t the point, I like stuff that&#39;s free like speech and will struggle to only use stuff that&#39;s free like speech.&nbsp; Even if it means recompiling stuff until everything else broke.
<br><br><br>ciao<br><br>cputter<br><br><br><br><div><span class="gmail_quote">On 13/11/2007, <b class="gmail_sendername">Christiaan Putter</b> &lt;<a href="mailto:ceputter@googlemail.com">ceputter@googlemail.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks Pau,&nbsp;&nbsp; I&#39;ll build <span id="st" name="st" class="st">Python</span> with mingw and give it a try.
<br><br>I&#39;ll let you guys know how that worked out...<br><br>Have a&nbsp; nice evening.<div><span class="e" id="q_116362533a1c8cd7_1"><br><br><br><div><span class="gmail_quote">On 13/11/2007, <b class="gmail_sendername">
Pau Garcia i Quiles</b> &lt;<a href="mailto:pgquiles@elpauer.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pgquiles@elpauer.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Quoting Christiaan Putter &lt;<a href="mailto:ceputter@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ceputter@googlemail.com</a>&gt;:<br><br>(Returning this to the mailing list, as you mistakenly replied to me
<br>in private)<br><br>&gt; Hi Pau,<br>&gt;
<br>&gt; Thanks for the swift reply.<br>&gt;<br>&gt; From the boost website page on building boost there&#39;s a section on Mingw,<br>&gt; quoting:<br>&gt;<br>&gt; &quot;If you are using a version of Python prior to 2.4.1

 with a MinGW prior to<br>&gt; 3.0.0 (with binutils-2.13.90-20030111-1), you will need to create a<br>&gt; MinGW-compatible version of the Python library; the one shipped with Python<br>&gt; will only work with a Microsoft-compatible linker...&quot;
<br>&gt;<br>&gt; The mingw site says something similar.<br>&gt;<br>&gt; I assumed this meant that using an up to date version of python (2.5) and<br>&gt; mingw meant it should work &#39;out of the box&#39;.<br><br>No, it means Python sources since 
2.4 do not need to be patched to<br>build with MinGW:<br><a href="http://www.mingw.org/MinGWiki/index.php/Python" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.mingw.org/MinGWiki/index.php/Python
</a> extensions<br><br>&gt; I forgot to mention though that I&#39;m embedding pyhton into c++, so compiling
<br>&gt; a normal c++ executable.&nbsp;&nbsp;Also, like I said, compiling and linking something<br>&gt; using only the python25 lib works.&nbsp;&nbsp;I&#39;m getting errors when linking to my<br>&gt; boost.python libs.<br><br>Most probably your problem is due to different call conventions being
<br>used (__stdcall and __cdecl). Read about that here:<br><a href="http://www.geocities.com/yongweiwu/stdcall.htm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.geocities.com/yongweiwu/stdcall.htm
</a><br><br>Either you build Python with MinGW, then try to link and make sure you
<br>are providing all the libraries you need, or you try to create your<br>own import libraries for VC++-compiled Python. I&#39;d go for the former,<br>as it will be easier.<br><br>&gt; In case someone else is following this thread that wants to extend python:
<br>&gt;<br>&gt; If you&#39;re compiling python code with mingw you&#39;ll have to tell it to use<br>&gt; mingw<br>&gt; ie. something like: python setup.py build --compiler=mingw32<br>&gt; There&#39;s a nice tutorial at<br>

&gt; <a href="http://boodebr.org/main/python/build-windows-extensions" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://boodebr.org/main/python/build-windows-extensions</a><br>&gt;<br>&gt; I don&#39;t know if this is applicable to embedding too.
<br><br>I have never embedded Python in an application and hardly programmed
<br>anything in Python ever. I&#39;m a Ruby guy.<br><br>&gt; Am I correct in assuming this Pau?<br>&gt;<br>&gt;<br>&gt; On 12/11/2007, Pau Garcia i Quiles &lt;<a href="mailto:pgquiles@elpauer.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
pgquiles@elpauer.org</a>
&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Quoting Christiaan Putter &lt;<a href="mailto:ceputter@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ceputter@googlemail.com</a>&gt;:<br>&gt;&gt;
<br>&gt;&gt; Are you using a mingw-compiled Python? In case you are using a
<br>&gt;&gt; VC++-compiled version of Python (which is the one you download from<br>&gt;&gt; <a href="http://python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">python.org</a>), have you created import libraries for MinGW?
<br>&gt;&gt;<br>&gt;&gt; &gt; Hi guys and girls,
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I&#39;m new to this wonderful CMake thingy and I&#39;m having some problems<br>&gt;&gt; linking<br>&gt;&gt; &gt; to boost.python.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; My setup on windows xp:
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; mingw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.3&nbsp;&nbsp;(with gcc 3.4.5)<br>&gt;&gt; &gt; boost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.34.1<br>&gt;&gt; &gt; python&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.5<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I compiled boost as per instructions with mingw without any problems.
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; With some simple code using boost/python I can compile without errors,<br>&gt;&gt; but<br>&gt;&gt; &gt; when ld tries linking I get &quot;undefined reference to &#39;_imp____&nbsp;&nbsp;....&quot;
<br>&gt;&gt; errors.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; In my CMakeLists file I have<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; TARGET_LINK_LIBRARIES(${EXE_NAME}<br>&gt;&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${BOOST_PYTHON_LIB}<br>&gt;&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${PYTHON_LIBRARIES}
<br>&gt;&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; With the BOOST_PYTHON_LIB pointing directly to<br>&gt;&gt; &gt; C:/Boost/lib/libboost_python-mgw34-1_34_1.a<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Removing code using 
boost.python
 stuff and just using the normal python<br>&gt;&gt; lib<br>&gt;&gt; &gt; compiles and links fine.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; What am I doing wrong?&nbsp;&nbsp;I&#39;ve tried every version of the boost_python lib<br>&gt;&gt; by
<br>&gt;&gt; &gt; the way, -mt, -s, -d, and combinations thereof.&nbsp;&nbsp;Which one should I use,<br>&gt;&gt; is<br>&gt;&gt; &gt; there a way to chose the correct library automatically, the<br>&gt;&gt; &gt; FindBoost.cmakeinclude

 doesn&#39;t seem to do it.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; And what exactly is the -s library for? I though lib*.a files were<br>&gt;&gt; already<br>&gt;&gt; &gt; static?<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; If anyone out there has gotten 
boost.python to work with mingw please<br>&gt;&gt; let me<br>&gt;&gt; &gt; in on your secrets.&nbsp;&nbsp;Any suggestions are welcome...<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Have a nice day,<br>&gt;&gt; &gt; cputter<br>&gt;&gt; &gt;<br>

&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Pau Garcia i Quiles<br>&gt;&gt; <a href="http://www.elpauer.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.elpauer.org</a>
<br>&gt;&gt; (Due to my workload, I may need 10 days to answer)<br>&gt;&gt;
<br>&gt;&gt; _______________________________________________<br>&gt;&gt; CMake mailing list<br>&gt;&gt; <a href="mailto:CMake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">CMake@cmake.org
</a><br>&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.cmake.org/mailman/listinfo/cmake</a><br>&gt;&gt;<br>&gt;<br><br><br><br>--<br>Pau Garcia i Quiles<br><a href="http://www.elpauer.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.elpauer.org
</a><br>(Due to my workload, I may need 10 days to answer)
<br><br></blockquote></div><br>
</span></div></blockquote></div><br>