<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 8:24 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
On 7/22/2010 10:34 AM, Geoffroy Couprie wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    * Performance of the VM: With the JIT, the performance difference<br>
    between the compilers no longer matters.<br>
    * Size of difficulty of the install: New versions of MingW are no<br>
    easier to install than Cygwin or other monsters.<br>
<br>
MSYS is not that hard to install. And GCC can be use to cross compile,<br>
which is really useful for tests, continuous integration, etc.<br>
</blockquote>
<br></div>
You can do all of this on Windows, we use Ant and Staf for such purposes.</blockquote><div>Sure. That was mostly for convenience, because cross compiling means that I don&#39;t need two different machines to build the Windows and Linux versions.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    On the other hand, there are some exceptionally good reasons to use<br>
    MSVC:<br>
    * Debugging: Did you know that MSVC now has seemless in-place<br>
    editing? When I worked on SqueakSSL, I was shocked to find that an<br>
    access violation was simply presented as a break point and after<br>
    fixing it the compiler patched the code in place without restarting<br>
    Squeak, and it worked!<br>
    * Up-to-date headers and libraries: SqueakSSL wouldn&#39;t compile on<br>
    *any* version of MingW or Cygwin due to the absence / lack of<br>
    correctness of the headers and missing libraries even though the<br>
    APIs are 5+ years old.<br>
<br>
Did you check the recent headers? Most of the recent API (XP/Vista) are<br>
in the actual MinGW headers. The DirectX headers are a bit old, but<br>
considering you&#39;re using DirectX 7, I don&#39;t think that&#39;s an issue. What<br>
specific headers/libraries/functions are you talking about?<br>
</blockquote>
<br></div>
Try compiling SqueakSSL and see how far you get. But really, I&#39;m just *tired* of hunting this stuff; I have lost all patience.</blockquote><div>I will try. I know how annoying it can be to fix headers, but it got a lot better with recent versions.</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    * Consistent use of runtime libraries: For some external linkage,<br>
    having the latest MSVC platform libraries available is important.<br>
<br>
    At this point the advantage is clearly with the MS tool chain and<br>
    the only hurdle is that I&#39;ll have to update all the makefiles etc.<br>
<br>
  Well, here goes my shameless advertisement: CMake could be used to<br>
generate Makefiles for MSVC :)<br>
</blockquote>
<br></div>
I&#39;m not sure I understand. What point is there in &quot;generating&quot; Makefiles? I&#39;ve never generated any Makefiles for my builds, why would an extra indirection be advantageous?</blockquote><div>Again, for convenience: you can detect if all the required libraries are present, add user specified paths (instead of hard-coded paths in the actual Makefile), and if you add files to the cross directory, you only have to modify one file to enable compilation on Windows and Linux.</div>

<div>I can understand if you prefer writing Makefiles by hand, instead of using autotools, but CMake is really easy to use, and can create Makefiles for Linux, MSVC and MinGW, with no extra effort. Maintaining two build chains is more work.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Anyway, do you think you could keep the code compatible with GCC? I<br>
could take care of the header fixes.<br>
</blockquote>
<br></div>
I&#39;m not planning on breaking anything that compiles today but I&#39;ll no longer go out of my way to provide compatibility with ancient headers and libraries. In other words, no more code like this:<br>
<br>
#if _WIN32_WINNT &lt; 0x0500 /* i.e., an old mingw */<br>
<br>
static HRESULT (__stdcall *SHGetFolderPathW)(HWND, int, HANDLE, DWORD, WCHAR*);<br>
<br>
#define CSIDL_APPDATA 0x001A<br>
#define CSIDL_PROGRAM_FILES 0x0026<br>
#define CSIDL_MYMUSIC 0x000D<br>
#define CSIDL_MYPICTURES 0x0027<br>
#define CSIDL_MYVIDEO 0x000E<br>
#define CSIDL_PROFILE   40<br>
<br>
#endif<br>
<br>
/* ... */<br>
<br>
#if _WIN32_WINNT &lt; 0x0500 /* i.e. on old mingw */<br>
  hShell = LoadLibrary(&quot;SHFolder.dll&quot;);<br>
  SHGetFolderPathW = (void*)GetProcAddress(hShell, &quot;SHGetFolderPathW&quot;);<br>
#endif<br></blockquote><div> </div><div> SHGetFolderPathW is provided by MinGW now. With a recent version, I could clean a lot of those #ifdef. And if the code produced by MSVC is faster than gcc 2.95, then performance is no longer a reason to keep using 2.95.</div>

<div><br></div><div>Best regards,</div><div><br></div><div>Geoffroy</div></div>