ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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