Working with Quantlib in Lion

I’ve successfully built quantlib on Mac OS 10.11.3 (there is libQuantlib.a in /usr/local/lib). But know when I try to use it in my own project with Clion it doesn’t work. More specifically, I added Boost paths in Cmakelists.txt (it works properly) and then Quantlib paths in a following way:
set(QUANT_ROOT “/usr/local”)
set(QUANT_INCLUDE_DIR ${QUANT_ROOT}/include)
set(QUANT_LIBRARY_DIR ${QUANT_ROOT}/lib)

include_directories(${QUANT_ROOT})
include_directories(${QUANT_INCLUDE_DIR})

when I write in main.cpp:

#include <ql/quantlib.hpp>

It finds this file, but when I build the following error appears:

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1

Could you help me please with this issue?

1 comment

Hi Emma.

Please take a look at our blog post about using quantlib in CLion: https://blog.jetbrains.com/clion/2015/12/quantlib-clion/.

0

Please sign in to leave a comment.