[Coin-discuss] COIN on a Mac
Laszlo Ladanyi
ladanyi at us.ibm.com
Wed Jan 1 22:37:04 EST 2003
Hi Scott,
Great contribution! Thanks! I'll incorporate the changes sometime early next
week. Just send me the appropriate files in a personal email.
Thanks again,
--Laci
On Wed, 1 Jan 2003 ScottWelz at aol.com wrote:
> I have made the changes necessary to get some of the COIN libraries running
> on the Mac OS X Unix kernel (Darwin). Darwin is based on BSD unix (netBSD
> 4.4) and also includes some elements from FreeBSD and GNU (gcc in
> particular). I have successfully compiled and run: VOL, CLP, OSI, CGL,
> and BCP. The unitTest for CLP completes successfully and MaxCut is
> successful on the junger1 test problem.
>
> I realize that there probably wonât be many who use this platform, but since
> its what Iâve got, Iâm hoping youâll make the changes necessary to support
> it.
>
> Here are the code changes:
>
> 1.) ./COIN/Coin/include/CoinFinite.hpp
>
> Add the following code before the last #endif in the file:
>
> #if defined(__GNUC__) && defined(__MACH__)
> extern "C" {
> int isnan(double);
> }
> inline int CoinFinite(double d);
> # define CoinFinite finite
> # define CoinIsnan isnan
> #endif
>
> 2.) ./COIN/Bcp/include/BCP_os.hpp
>
> Add the following code before the last #endif in the file:
>
> #if defined(__MACH__) && defined(__GNUC__)
> # include "BCP_MACH.hpp"
> #endif
>
> 3.) Add a couple of OS specific files
>
> Need to add the file Makefile.Darwin to the COIN/Makefiles directory and the
> file BCP_MACH to the COIN/Bcp/include directory. I have not included these
> files here in the interest of space. What is the best way to get these
> files into the library?
>
> Darwin does not support shared libraries, so all the libraries must be
> created as STATIC, not SHARED (just something the user needs to be aware of
> when trying to make the libraries).
>
> Also, I needed to make a change in the OsiClpSolverInterface.cpp file. When
> making the library, the system was not finding the #include <time.h> file.
> I needed to change this line to #include <sys/time.h> to get the time
> functions needed. Not sure if this is an idiosyncrasy of Darwin or a bug in
> the code. If it's not a bug, Iâll need to add a conditional to handle the
> #include for Darwin while leaving it the same for everyone else.
>
> Are there any issues with adding these changes to the library?
>
More information about the Coin-discuss
mailing list