2017-02-18 253 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