Robotics StackExchange | Archived questions

Problem compiling against external library

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 LDLIBRARYPATH - I tried adding path to the lib in both, with no results. Any help will be appreciated!

da-na

Asked by da-na on 2013-08-22 22:28:57 UTC

Comments

Try building with VERBOSE=1 make, and also show what's in the DOOR directory via ls.

Asked by dornhege on 2013-08-22 23:50:36 UTC

Answers