Problem compiling against external library [closed]

asked 2013-08-22 22:28:57 -0600

da-na gravatar image

updated 2013-11-14 11:04:11 -0600

tfoote gravatar image

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-06-24 13:37:51.814740

Comments

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

dornhege gravatar image dornhege  ( 2013-08-22 23:50:36 -0600 )edit