Mac buildΒΆ

Ali Afroozeh kindly provided the following build instructions for Mac OS X.

For compiling BDDSolve on Mac OS X, one need to have the g++ compiler and other libraries, which means that she should install XCode. I compiled BDDSolve on Mac OS X Lion (10.7) using Xcode 4.2.1 which is the latest version at the time, though it should work fine with older versions as well.

There are two libraries needed: Boost and Buddy. Both of them are available in MacPorts (Equivalent to APT in Debian), but I have compiled Boost (1.4.7) from the source, because I could not find the location of libraries for linking. Building boost is straightforward.

Then, for compiling, one needs to execute the following command in the src folder of bddsolve:

g++ -I ../include/ -I /usr/local/include/boost/ -L /Users/ali/libs/ -L /usr/local/lib -lboost_program_options -lbdd bddsolve.cpp -o bddsolve

/Users/ali/libs/ is a custom folder in which I put all the boost libraries which needed be linked to. I could not find their location after installing boost, so I used “find . -iname “*.a”“ and “find . -iname ”.dylib” in the boost source folder, after compiling, to gather all the compiled libraries and put them in a custom folder and used the -L switch.

Unfortunately, making a static build on Mac OS X is not possible for bddsolve. The -static switch in g++ manual says:

“This option will not work on Mac OS X unless all libraries (including libgcc.a) have also been compiled with -static. Since neither a static version of libSystem.dylib nor crt0.o are provided, this option is not useful to most people.”

And we need ctr0.o for compiling bddsolve. I got this error when I enabled the static build: “ld: library not found for -lcrt0.o”.