[Coin-discuss] problems with cross-compiling CoinUtils for Windows
Laszlo Ladanyi
ladanyi at us.ibm.com
Wed Apr 16 08:06:12 EDT 2008
I seem to remember that the __MSVCRT__ was taken off because that caused
problems with some combination of cygwin/msys/gcc/cl, but I may be wrong. If
someone has access to these, could you test that Kish's change does not break
things?
Thanks,
--Laci
On Wed, 16 Apr 2008, Kish Shen wrote:
> Hi,
>
> I cross-compile the COIN libraries for MS Windows using mingw32msvc on a (x86) Linux box.
> For recent trunk branch of Cbc, I get a compiler error that gettimeofday() is not defined
> when compiling CoinTime.cpp in CoinUtils. The problem seems to be in CoinTime.hpp -- the
> wrong definition of CoinGetTimeOfDay() is selected for compiling -- there is a #if macro
> that is currently defined as:
>
> #if defined(_MSC_VER)
>
> (line 30 in my copy of CoinTime.hpp)
>
> which does not seem to catch the cross-compiling case. I modified this back to:
>
> #if defined(_MSC_VER) || defined(__MSVCRT__)
>
> which was what was there in older versions of the file that compiled without error.
>
> With this change, I was able to compile Cbc. Is this the correct fix for the problem?
>
> Cheers,
>
> Kish
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
More information about the Coin-discuss
mailing list