0
$\begingroup$

Rosanswers logo

Hello. I have a problem with adding libraries, orocos components to ROS project. In CMakeLists.txt I add line:

include_directories(/home/user/my_lib_orocos)

But I still can't add any library from that folder to .cpp files, compiler doesn't see it. In addition, these folder isn't in the same path as my ROS project.


Originally posted by Roboticus on ROS Answers with karma: 1 on 2013-04-13

Post score: 0


Original comments

Comment by cagatay on 2013-04-16:
are they custom libraries or orocos libraries such as bfl or kdl ? Which ros distro are you using ?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Hello Roboticus,

I have added these lines for a ros project using the LabJack U3 Modul. It also has a separate library.

  • #directory where the library file is in
  • link_directories(/home/thomas/projects/labjack/exodrive/liblabjackusb)
  • #add the cpp files of your project
  • rosbuild_add_executable(labjack src/LabJack.cpp src/... some more files ...)
  • #link the library to the project (name of lib file: liblabjackusb.so.2.5.2
  • target_link_libraries (labjack labjackusb)

As you can see the library is written without the pre-string "lib" and without the version number and type at the end. So the filename "liblabjackusb.so.2.5.2" will become -> "labjackusb".

The command you used: include_directories(/home/user/my_lib_orocos) is more or less to describe where the header files are.

Hope this helps you with your problem.

Best regards, zumili


Originally posted by zumili with karma: 141 on 2013-04-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

If you want to build your own Orocos based components/packages, please take a look at http://www.orocos.org/wiki/orocos/toolchain/component-packages to learn how this is done.


Originally posted by Ruben Smits with karma: 543 on 2013-04-21

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.