There were a few compile errors when trying to build gambit with the visual studio c++ compiler.  After these changes gambit seems to work fine.  Marc, maybe you can include them in the source.  Thanks.<br><br>---<br><br>diff -rup ..\..\..\..\..\temp\gambc-v4_6_0-devel\lib\os_files.c .\os_files.c<br>
--- ..\..\..\..\..\temp\gambc-v4_6_0-devel\lib\os_files.c    Thu Jan 07 12:58:49 2010<br>+++ .\os_files.c    Sat Apr 03 00:03:18 2010<br>@@ -545,7 +545,7 @@ ___SCMOBJ ___os_path_gambcdir ___PVOID<br> #ifdef _UNICODE<br>           _tcscpy (gambcdir, temp);<br>
 #else<br>-          mbstowcs (gambcdir, temp, cch);<br>+          mbstowcs ((wchar_t *)gambcdir, temp, cch);<br>               gambcdir[cch] = '\0';<br> #endif<br>           ___setup_params.gambcdir = gambcdir;<br>
diff -rup ..\..\..\..\..\temp\gambc-v4_6_0-devel\lib\os_tty.c .\os_tty.c<br>--- ..\..\..\..\..\temp\gambc-v4_6_0-devel\lib\os_tty.c    Thu Jan 07 12:58:49 2010<br>+++ .\os_tty.c    Sat Apr 03 00:09:42 2010<br>@@ -3391,7 +3391,7 @@ ___U8 *text_arg;)<br>
           {<br>             if (text_arg != NULL)<br>               {<br>-                SetWindowTextA (cons_wind, text_arg); /* ignore error */<br>+                SetWindowTextA (cons_wind, (LPCSTR)text_arg); /* ignore error */<br>
               }<br>             else<br>               {<br>@@ -4491,7 +4491,7 @@ int len;)<br> <br>           if (global_copy != NULL)<br>             {<br>-              ___U16 *locked_copy = GlobalLock (global_copy);<br>
+              ___U16 *locked_copy = (___U16 *)GlobalLock (global_copy);<br> <br>               if (locked_copy == NULL)<br>                 GlobalFree (global_copy);<br>@@ -4576,7 +4576,7 @@ ___device_tty *self;)<br> <br>
           if (global_copy != NULL)<br>             {<br>-              ___U16 *locked_copy = GlobalLock (global_copy);<br>+              ___U16 *locked_copy = (___U16 *)GlobalLock (global_copy);<br> <br>               if (locked_copy != NULL)<br>
                 {<br><br><br><br><br><div class="gmail_quote">On Thu, Apr 1, 2010 at 4:52 PM, Kartik Saranathan <span dir="ltr"><<a href="mailto:ksaranat@gmail.com">ksaranat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello all.<div><br></div><div><div><div><div>I'd like to compile and link gambit generated code with C++ code.  Looking</div><div>at previous posts on this mailing list the way to do it is to build gambit</div><div>with a c++ compiler.  I have Visual Studio 2008.  I tried adding the options</div>

<div>-TP (compile as C++ code) and -EHsc (enable c++ exceptions) to </div><div>misc/vc2008.bat but the code does not compile without modifications (there</div><div>is some type casting from void* to non-void* which require explicit cast in c++).</div>

<div><br></div><div>What is the proper way to build gambit using the Visual Studio 2008 c++</div><div>compiler?  On unix systems I can pass --enable-cplusplus option to</div><div>configure.  Can I setup mingw or cygwin to do the same on Windows?  If so</div>

<div>how do I do this?</div><div><br></div><div>Also the windows binary distribution of Gambit 4.6.0 opens a new window when</div><div>running "gsc -exe test.scm".  Once the compile finishes the window is closed</div>

<div>immediately making it hard to read the output.  I notice when I compile</div><div>gambit using vc2008.bat it does not open a new window.  It would be better</div><div>if the official binary distribution did this as well.  I notice that for</div>

<div>binaries that I build using gsc if I define _WINDOWS it opens a new console</div><div>window.  Maybe the official windows binary distribution compiles gsc with</div><div>_WINDOWS defined?</div><div><br></div></div><div>

Thank you</div><div><br></div><div>- Kartik</div><div><br></div></div></div>
</blockquote></div><br>