我正在尝试在macOS Sierra上安装QuantLib,但是当我在最后运行检查时:
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
。我最初使用Homebrew选项遵循说明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 :(得分:0)
目前为止,我发现只是运行brew install quantlib
。