Closed hichamhendy closed 1 year ago
From the description above it does not seem like you are including cppad_lib in the linking.
The solution was in reinstalling but tu in the right order CPPAD after ipopt
The solution was in reinstalling but tu in the right order CPPAD after ipopt
Is there a reliable installation tutorial for cppad?
The optional dependencies should be installed before installing CppAD (if you are going to use them with CppAD). See https://cppad.readthedocs.io/en/latest/cmake.html#cmake-title
Especially the discussion of the following options:
-D include_adolc = true_or_false \
-D include_eigen = true_or_false \
-D include_ipopt = true_or_false \
-D include_cppadcg = true_or_false \
\
-D eigen_prefix = eigen_prefix
-D colpack_prefix = colpack_prefix \
-D fadbad_prefix = fadbad_prefix \
-D sacado_prefix = sacado_prefix \
By Making my project, I keep getting the following error(CppAD::vector const&, std::string&)':
MPC.cpp:(.text._ZN5CppAD17put_check_for_nanIdEEvRKNS_6vectorIT_EERSs[_ZN5CppAD17put_check_for_nanIdEEvRKNS_6vectorIT_EERSs]+0x64): undefined reference to
In function
void CppAD::put_check_for_nanCppAD::local::temp_file()'
My CMakeList file looks like that: project(ipopt_test)
cmake_minimum_required (VERSION 3.5)
add_definitions(-std=c++11)
set(CXX_FLAGS "-Wall") set(CMAKE_CXX_FLAGS "${CXX_FLAGS}")
set(sources src/test.cpp src/main.cpp)
include_directories(src/Eigen-3.3) include_directories(/usr/local/include) link_directories(/usr/local/lib)
add_executable(ipopt_test ${sources})
target_link_libraries(ipopt_test ipopt python2.7)
Can anyone help?