On 2012-01-31, at 3:43 AM, REPLeffect wrote:
I just thought I'd share this in case it helps someone else.
To compile Gambit 4.6.3 in the MinGW/MSys shell, I had to add the following flags to the gcc commands for compiling C files to object files:
-fpermissive -fno-keep-inline-dllexport
Recent versions of MinGW use gcc version 4.6.1, which I suspect has stricter default requirements on the C code than prior versions of gcc, and I believe that's why I had to add -fpermissive.
The -fno-keep-inline-dllexport flag was added because I was getting an out of memory error compiling at least one C file.
I also added -Wno-write-strings because I was tired of warning messages.
It's a bit of a hack (and I'm sure there is a more correct place to put this), but I modified the configure script to do this by adding it in the FLAGS_OBJ line here:
case "$target_os" in
mingw*) # add Windows libraries needed by MinGW LIBS="$LIBS -lws2_32" FLAGS_OBJ="$FLAGS_OBJ -D_WINDOWS -Wno-write-strings
-fpermissive -fno-keep-inline-dllexport"
If Marc (or others) want more detail, I'd be happy to oblige. I can extract the 4.6.3 tar file somewhere else and try to build it, and not the exact error messages, etc.
Note that -fpermissive is specific to C++. Were you using --enable-cplusplus? Moreover, the documentation says:
-fpermissive Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using -fpermissive will allow some nonconforming code to compile.
Now, why did you have to use this option? Can you send me the error message that were generated? I don't want to add this option to the default compilation options because it implies that the Gambit sources have some nonconformance issue, and that shouldn't be the case.
Marc