Skip to content

Linking error "undefined reference to `CppAD::local::temp_file()'" #169

@HHendy69

Description

@HHendy69

By Making my project, I keep getting the following error
In functionvoid CppAD::put_check_for_nan(CppAD::vector const&, std::string&)':
MPC.cpp:(.text._ZN5CppAD17put_check_for_nanIdEEvRKNS_6vectorIT_EERSs[_ZN5CppAD17put_check_for_nanIdEEvRKNS_6vectorIT_EERSs]+0x64): undefined reference to CppAD::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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions