When I first encoutered the following problem, I add "add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)" in the my project cmake file. The problem is solved.
" undefined reference to `casadi::Function::Function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::initializer_list<casadi::MX>, std::initializer_list<casadi::MX>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, casadi::GenericType, std::less<std::__cxx11::b... "
However, when I want to link CASADI with other libraries , like HIGHS, an optimization solver, The setting of -D_GLIBCXX_USE_CXX11_ABI=0 conflicts with the setting of other packages.
My questions is can I compile casadi library with -D_GLIBCXX_USE_CXX11_ABI=1 ?
I tried add add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1) in the CASADi CMakeLists.txt file, but this does not work.
for example
"
....
set(PACKAGE_MAINTAINER "Joel Andersson and Joris Gillis")
set(PACKAGE_URL "http://casadi.org")
add_definitions(-D_GLIBCXX_USE_CXX11_AB=1)
############################################################
####################### Policies ###########################
############################################################
# Enforce cmake2.4+ style behaviour for
# mixed filename/full path linker directives
cmake_policy(SET CMP0003 NEW)...
"