On 2011-02-19 10:00 AM, Jon S. Berndt wrote:
Does anyone here regularly build JSBSim with mingw to get out of the cygwin
library dependency?
I don't regularly build JSBSim with mingw, but since I was installing
the latest mingw (with GCC 4.5.2) on my work PC for other reasons
tonight, I thought that I'd give JSBSim a try, to check my mingw
installation if nothing else.
Either others have a different installation, or no one is using it,
because there is an error in the configure.in file as far as I can tell.
With a clean JSBSim checkout, I ran autogen.sh, then make, and received
an error when the first library was to be created by ar. The attached
patch sets ARFLAGS to a value specifically for mingw. Previously
ARFLAGS was not getting set to anything, so the ar command line was
being mis-interpreted throwing out an odd error.
After this change, I was able to run
make
make check
JSBSim --script=scripts/737_cruise.xml
and get the identical results (on the last) that I get for my Mac OS X 10.5.
Running JSBSim.exe through the dependency walker showed dependence on MS
DLLS and two from \mingw\bin:
libgcc_s_dw2-1.dll
libstdc++-6.dll
And no sub-dependencies under them. Those are in the standard
\mingw\bin path, but there appears to be questions about distributing
them (alone) with an executable since they are GPL. So I added
LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" into the
configure.in file to eliminate these dependencies. The EXE is
marginally bigger, but it is already pretty big (~28M)