<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Compiling Python extensions with distutils and MinGW</title>
	<atom:link href="http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/feed/" rel="self" type="application/rss+xml" />
	<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/</link>
	<description>Eli Bendersky's personal website</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:32:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tejovathi</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-252367</link>
		<dc:creator>Tejovathi</dc:creator>
		<pubDate>Tue, 19 Jan 2010 17:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-252367</guid>
		<description>HI All,

I am trying to do the same thing i.e I have a C++ DLL and C++ header file. Now I am trying to build a SWIG extension so that I can use it in Python. Now, I create a .i file and passed it to swig. I successfully got the .cxx file. I passes this file as source in distutils. But when I run setup.py, I am getting a undefined refence error. How to solve this? Please reply asap</description>
		<content:encoded><![CDATA[<p>HI All,</p>
<p>I am trying to do the same thing i.e I have a C++ DLL and C++ header file. Now I am trying to build a SWIG extension so that I can use it in Python. Now, I create a .i file and passed it to swig. I successfully got the .cxx file. I passes this file as source in distutils. But when I run setup.py, I am getting a undefined refence error. How to solve this? Please reply asap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vishwajeet</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-225669</link>
		<dc:creator>Vishwajeet</dc:creator>
		<pubDate>Fri, 13 Nov 2009 09:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-225669</guid>
		<description>you saved my day thank you so much.</description>
		<content:encoded><![CDATA[<p>you saved my day thank you so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacobo</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-163288</link>
		<dc:creator>Jacobo</dc:creator>
		<pubDate>Thu, 26 Mar 2009 15:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-163288</guid>
		<description>Thanks for the guide! Helped alot.</description>
		<content:encoded><![CDATA[<p>Thanks for the guide! Helped alot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anish</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-125157</link>
		<dc:creator>Anish</dc:creator>
		<pubDate>Tue, 05 Aug 2008 06:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-125157</guid>
		<description>Hi,,thank&#039;s for lot&#039;s of information 
but i&#039;m having one problem again..i have created .pyd file using gcc from mingw for one sample example but when called from python as 
&gt;&gt;import sample
&gt;&gt;print sample.cal(2,3)
it&#039;s not showing anyvalue or error, I used SWIG for creating wrap and .o file.</description>
		<content:encoded><![CDATA[<p>Hi,,thank&#8217;s for lot&#8217;s of information<br />
but i&#8217;m having one problem again..i have created .pyd file using gcc from mingw for one sample example but when called from python as<br />
&gt;&gt;import sample<br />
&gt;&gt;print sample.cal(2,3)<br />
it&#8217;s not showing anyvalue or error, I used SWIG for creating wrap and .o file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-124719</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Sun, 27 Jul 2008 18:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-124719</guid>
		<description>Basil,
I&#039;m glad you&#039;ve found the solution. I&#039;ve actually linked to this page in the post itself.</description>
		<content:encoded><![CDATA[<p>Basil,<br />
I&#8217;m glad you&#8217;ve found the solution. I&#8217;ve actually linked to this page in the post itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basil</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-124652</link>
		<dc:creator>Basil</dc:creator>
		<pubDate>Sat, 26 Jul 2008 16:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-124652</guid>
		<description>I figured it out! If interested, please see &lt;a href=&quot;http://boodebr.org/main/python/build-windows-extensions#comment-18419&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>I figured it out! If interested, please see <a href="http://boodebr.org/main/python/build-windows-extensions#comment-18419" rel="nofollow">this page</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basil</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-124588</link>
		<dc:creator>Basil</dc:creator>
		<pubDate>Fri, 25 Jul 2008 12:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-124588</guid>
		<description>Hi Eli,

It is possibly one of the few million compiler/linker/project options in VS, but I am not an expert in that either.. or quite possibly my best guess at the project&#039;s composition of files is wrong.

Both the VS problem and the mingw32 problem have answers floating around the net, though nothing definitive; but I&#039;ll keep looking. After all, I only stumbled on your page after two days of shooting in the Google dark :)

The other excellent resource is frank&#039;s &quot;Building Python extensions for Windows with only free tools&quot; that you link to.  I also have Cygwin.  The libmcrypt library compiles successfully only with default (i.e., Cygwin-dependent) settings during ./configure.  I had no success in using frank&#039;s recipe with the &quot;-mno-cygwin&quot; switches; but then again, I know very very little about the *POSIX environment.

I&#039;ll keep looking.
Keep up the good work!
&lt;i&gt;Basil&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>Hi Eli,</p>
<p>It is possibly one of the few million compiler/linker/project options in VS, but I am not an expert in that either.. or quite possibly my best guess at the project&#8217;s composition of files is wrong.</p>
<p>Both the VS problem and the mingw32 problem have answers floating around the net, though nothing definitive; but I&#8217;ll keep looking. After all, I only stumbled on your page after two days of shooting in the Google dark <img src='http://eli.thegreenplace.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The other excellent resource is frank&#8217;s &#8220;Building Python extensions for Windows with only free tools&#8221; that you link to.  I also have Cygwin.  The libmcrypt library compiles successfully only with default (i.e., Cygwin-dependent) settings during ./configure.  I had no success in using frank&#8217;s recipe with the &#8220;-mno-cygwin&#8221; switches; but then again, I know very very little about the *POSIX environment.</p>
<p>I&#8217;ll keep looking.<br />
Keep up the good work!<br />
<i>Basil</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-124564</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Fri, 25 Jul 2008 04:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-124564</guid>
		<description>Hi Basil,

Could it be a problem with VS&#039;s C/C++ standard compatibility ? Although that probably doesn&#039;t explain the problem with mingw32. However, &#039;initializer element is not constant&#039; should be simple enough to diagnose.

I&#039;m not really an expert on these matters, so you might consider asking in the distutils mailing list.

Eli</description>
		<content:encoded><![CDATA[<p>Hi Basil,</p>
<p>Could it be a problem with VS&#8217;s C/C++ standard compatibility ? Although that probably doesn&#8217;t explain the problem with mingw32. However, &#8216;initializer element is not constant&#8217; should be simple enough to diagnose.</p>
<p>I&#8217;m not really an expert on these matters, so you might consider asking in the distutils mailing list.</p>
<p>Eli</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basil</title>
		<link>http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/comment-page-1/#comment-124562</link>
		<dc:creator>Basil</dc:creator>
		<pubDate>Fri, 25 Jul 2008 04:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/#comment-124562</guid>
		<description>This is a very cool and useful example, thanks for posting it!

I followed your tutorial and it worked perfectly (only had to clean up the ampersand HTML from your C code).

I will just mention that the binary win32 distribution of Python 2.5 ships with the &#039;libpython25.a&#039; file, so users such as myself can skip the pexports step.

The reason I am here is that I am looking for a solution to building the mcrypt library (libmcrypt) on win32 so that I can then build its extension, python-mcrypt.  I am stuck in several ways:

1. Problem compiling libmcrypt in VS 2003 because the __declspec(dllexport) issue causes a bunch of syntax errors during compile.

2. Using distutils with &quot;-c mingw32&quot;, I get the error &quot;initializer element is not constant&quot;

3. Using Cygwin to build libmcrypt works perfectly in Cygwin; unfortunately, I cannot for the life of me figure out how to carry over whatever is built there to the Windows side so I can built python-mcrypt.

Do you have any clues?

Thanks,
&lt;i&gt;Basil&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>This is a very cool and useful example, thanks for posting it!</p>
<p>I followed your tutorial and it worked perfectly (only had to clean up the ampersand HTML from your C code).</p>
<p>I will just mention that the binary win32 distribution of Python 2.5 ships with the &#8216;libpython25.a&#8217; file, so users such as myself can skip the pexports step.</p>
<p>The reason I am here is that I am looking for a solution to building the mcrypt library (libmcrypt) on win32 so that I can then build its extension, python-mcrypt.  I am stuck in several ways:</p>
<p>1. Problem compiling libmcrypt in VS 2003 because the __declspec(dllexport) issue causes a bunch of syntax errors during compile.</p>
<p>2. Using distutils with &#8220;-c mingw32&#8243;, I get the error &#8220;initializer element is not constant&#8221;</p>
<p>3. Using Cygwin to build libmcrypt works perfectly in Cygwin; unfortunately, I cannot for the life of me figure out how to carry over whatever is built there to the Windows side so I can built python-mcrypt.</p>
<p>Do you have any clues?</p>
<p>Thanks,<br />
<i>Basil</i></p>
]]></content:encoded>
	</item>
</channel>
</rss>
