<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>> I had some problems compiling sip 4.5.2
with <a href="http://MSVC.NET">MSVC.NET</a> 2003. Fortunately it<br>> was pretty easy to solve them with a couple of changes to configure.py and<br>> siputils.py<br>><br>> Please have a look at the attached patch for the changes I made. They might
<br>> 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. 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 Sat Dec 9 22:49:20 2006<br>+++ sip-4.5.2-new
/configure.py Mon Jan 22 18:16:52 2007<br>@@ -372,6 +373,10 @@<br> if opt_platform is None:<br> opt_platform = default_platform<br> <br>+ if opt_platform.find("msvc") >= 0:<br>+ global plat_py_conf_inc_dir
<br>+ plat_py_conf_inc_dir = sys.prefix + "\\PC"<br>+ <br> # Get the platform specific macros for building.<br> macros = siputils.parse_build_macros(os.path.join("specs", opt_platform), build_macro_names, args)
<br><br>Apparently the default include directory for the pyconfig.h file was being set to "Python-2.5\Include", when AFAICT if you compile with <a href="http://MSVC.NET">MSVC.NET</a> pyconfig.h is in "Python-2.5\PC
" instead. 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 Sat Dec 9 22:49:20 2006
<br>+++ sip-4.5.2-new/siputils.py Mon Jan 22 18:05:15 2007<br>@@ -1400,7 +1400,7 @@<br> if self.static:<br> if self.generator in ("MSVC", "<a href="http://MSVC.NET">MSVC.NET</a>", "BMAKE"):
<br> mfile.write("LIB = %s\n" % self.required_string("LIB"))<br>- if self.generator == "MINGW":<br>+ elif self.generator == "MINGW":<br>
mfile.write("AR = %s\n" % self.required_string("LIB"))<br> self._ranlib = None<br> else:<br><br>This seems like an obvious bug to me. If you are using <a href="http://MSVC.NET">
MSVC.NET</a>, you don't necessarily have "ar", 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. Due to this I was getting an error while running SIP's
configure.py saying that AR was not defined.<br><br>--<br>Miguel<br>