2017-02-18 252 views
0

我想在MacOS塞拉利昂安裝QuantLib,但是當我跑在最後的檢查:QuantLib安裝在MacOS 10.12塞拉利昂

g++ -I/usr/local/include/ -I/usr/local/include/boost BermudanSwaption.cpp \ 
    -o bermudanswaption -L/usr/local/lib/ -lQuantLib 

我收到以下錯誤。

ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我通過Homebrew安裝了boost。當我運行brew install boost時,我收到boost-1.63.0 already installed。我原本跟着使用自制軟件選項的說明here,但收到了同樣的最終誤差和產生警告編譯時:

warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 

我改變了命令,下面和棄用警告走了,但最終的誤差遺體。

./configure --with-boost-include=/usr/local/include/ \ 
      --with-boost-lib=/usr/local/lib/ --prefix=/usr/local/ \ 
      CXXFLAGS='-O2 -stdlib=libc++ -mmacosx-version-min=10.9' \ 
      LDFLAGS='-stdlib=libc++ -mmacosx-version-min=10.9' 

make && sudo make install 
+0

這很簡單。在嘗試鏈接符號之前,您必須並且必須編譯整個QuantLib源代碼。 – SmallChess

+0

哪些符號未找到? –

回答

0

迄今爲止最好的,我發現是隻運行brew install quantlib