0

I try to get QuantLib working on my macbook. But I don't know how to interpret the note in the instructions:

A note on Mac OS X 10.9 (Mavericks)

Users have reported linking problems under Mac OS X 10.9; the solution (thanks to Albert Azout for pointing it out) seems to be to set the environment flags CXXFLAGS and LDFLAGS to -stlib=libstdc++ -mmacosx-version-min=10.6 before compiling.

Can someone enlighten me?

Basilevs
  • 22,440
  • 15
  • 57
  • 102
andre de boer
  • 3,124
  • 3
  • 17
  • 15

1 Answers1

2

Supposing you're following the instructions here, you'll be compiling from the command line. In this case, you can set the variables in a few ways; I think the most convenient is to pass them to configure as in:

./configure --enable-static --with-boost-include=/opt/local/include/ \
            --with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ \
            CXXFLAGS="-stlib=libstdc++ -mmacosx-version-min=10.6" \
            LDFLAGS="-stlib=libstdc++ -mmacosx-version-min=10.6"

after which they'll be used by make to build the library.

(If you're using an IDE, I'm afraid you're on your own; you'll have to refer to its manual

Luigi Ballabio
  • 4,128
  • 21
  • 29
  • not really working. error message is as follows: configure: error: in `/Users/user/Desktop/QuantLib-1.6.2': configure: error: C compiler cannot create executables See `config.log' for more details – Shih-Min Lee Oct 04 '15 at 13:49
  • That points to a compiler misconfiguration: QuantLib is not even used during `./configure`. Did you install the command-line tools correctly? Can you compile and run a simple "hello world" program from the command line? – Luigi Ballabio Oct 04 '15 at 13:54