<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 1/24/2007 8:09 PM, Miguel Lobo wrote:<br><br>&gt; I had some problems compiling sip 4.5.2
 with <a href="http://MSVC.NET">MSVC.NET</a> 2003.&nbsp;&nbsp;Fortunately it<br>&gt; was pretty easy to solve them with a couple of changes to configure.py and<br>&gt; siputils.py<br>&gt;<br>&gt; Please have a look at the attached patch for the changes I made.&nbsp;&nbsp;They might
<br>&gt; not be the optimum solution, but they work for me.<br><br>Uhm, I compiled sip with .NET 2003 many times, without problems. Could<br>you elaborate on what are the problems you met?<br>--<br>Giovanni Bajo<br></blockquote>
</div><br>Well, if you look at the patch there are two changes.&nbsp; The first one is this:<br><br>diff -ur sip-4.5.2/configure.py sip-4.5.2-new/configure.py<br>--- sip-4.5.2/configure.py&nbsp;&nbsp;&nbsp; Sat Dec&nbsp; 9 22:49:20 2006<br>+++ sip-4.5.2-new
/configure.py&nbsp;&nbsp;&nbsp; Mon Jan 22 18:16:52 2007<br>@@ -372,6 +373,10 @@<br>&nbsp;&nbsp;&nbsp;&nbsp; if opt_platform is None:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opt_platform = default_platform<br>&nbsp;<br>+&nbsp;&nbsp;&nbsp; if opt_platform.find(&quot;msvc&quot;) &gt;= 0:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global plat_py_conf_inc_dir
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plat_py_conf_inc_dir = sys.prefix + &quot;\\PC&quot;<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; # Get the platform specific macros for building.<br>&nbsp;&nbsp;&nbsp;&nbsp; macros = siputils.parse_build_macros(os.path.join(&quot;specs&quot;, opt_platform), build_macro_names, args)
<br><br>Apparently the default include directory for the pyconfig.h file was being set to &quot;Python-2.5\Include&quot;, when AFAICT if you compile with <a href="http://MSVC.NET">MSVC.NET</a> pyconfig.h is in &quot;Python-2.5\PC
&quot; instead.&nbsp; This was causing compile errors because pyconfig.h could not be found.<br><br>The second change is this:<br><br>diff -ur sip-4.5.2/siputils.py sip-4.5.2-new/siputils.py<br>--- sip-4.5.2/siputils.py&nbsp;&nbsp;&nbsp; Sat Dec&nbsp; 9 22:49:20 2006
<br>+++ sip-4.5.2-new/siputils.py&nbsp;&nbsp;&nbsp; Mon Jan 22 18:05:15 2007<br>@@ -1400,7 +1400,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if self.static:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if self.generator in (&quot;MSVC&quot;, &quot;<a href="http://MSVC.NET">MSVC.NET</a>&quot;, &quot;BMAKE&quot;):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mfile.write(&quot;LIB = %s\n&quot; % self.required_string(&quot;LIB&quot;))<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if self.generator == &quot;MINGW&quot;:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elif self.generator == &quot;MINGW&quot;:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
mfile.write(&quot;AR = %s\n&quot; % self.required_string(&quot;LIB&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._ranlib = None<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else:<br><br>This seems like an obvious bug to me.&nbsp; If you are using <a href="http://MSVC.NET">
MSVC.NET</a>, you don&#39;t necessarily have &quot;ar&quot;, but if you look at the code immediately after this change, it was trying to get the value of the AR variable from the spec.&nbsp; Due to this I was getting an error while running SIP&#39;s 
configure.py saying that AR was not defined.<br><br>--<br>Miguel<br>