Problem compiling against external library [closed]
Hello!
I've been following this tutorial about CMakeLists and I have modified the CMakeLists file in following way:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
rosbuild_add_executable(door_analyzer src/door_demo.cpp)
include_directories(~/DOOR/Inc) # include door.h
link_directories(~/DOOR/Lib) # to link door.so
target_link_libraries(door_analyzer door)
And when I type rosmake door_analyzer I get the following error
Linking CXX executable ../bin/door_analyzer
/usr/bin/ld: cannot find -ldoor
collect2: ld returned 1 exit status
What am I doing wrong? My door lib is not in PATH nor LD_LIBRARY_PATH - I tried adding path to the lib in both, with no results. Any help will be appreciated!
da-na
Try building with VERBOSE=1 make, and also show what's in the DOOR directory via ls.