0
$\begingroup$

Rosanswers logo

Hi all, I know this is something every c++ programmer has to know, but i'm java programmer and just started learning C++ and ROS. If I have compiling flags like the following to compile a C++ program (not in ROS), how do I integrate this to a ROS program and modify my manifest or CMakeFiles?

-l Festival -I/usr/include/festival -I/usr/lib/speech_tools/include -leststring -lestools -lestbase

EDIT: and are there any other settings that I have to do? like, setting dependencies for example (if that even makes sense)?


Originally posted by Haikal Pribadi on ROS Answers with karma: 103 on 2012-02-25

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Not sure if it is the best way I did this with the following in CMakeLists.txt

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/festival -I/usr/lib/speech_tools/include")

For linking target libraries

target_link_libraries(example rt
python2.6
other_libraries)

Originally posted by ravenII with karma: 63 on 2012-02-25

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Haikal Pribadi on 2012-02-25:
I see you put in the -I (includes) flags, but where do we put the -L (libraries) ?? I don't understand your second section of code. Could you please, explain? thanks @ravenll, really..

Comment by ravenII on 2012-02-25:
I think this page explains the procedure. http://www.ros.org/wiki/rosbuild/CMakeLists/Examples#Linking_against_an_external_library

Comment by Haikal Pribadi on 2012-02-25:
Uh, I did not see this link before. This keeps on happening to me. Where do they put all these intermediate tutorial links? or do you have to know the specific link to the secret page :) ? Thanks btw, ravenll..

$\endgroup$
0
$\begingroup$

Rosanswers logo

I add the same problem and I solved like this:

FIND_LIBRARY(EXT_LIBRARY extName library_full_path)

target_link_libraries(
  my_node
  ${catkin_LIBRARIES} ${EXT_LIBRARY }
)

In my case I needed to add the library for a DepthSense camera:

FIND_LIBRARY(DEPTHSENSE_LIBRARY DepthSense /opt/softkinetic/DepthSenseSDK/lib/)

target_link_libraries(
  depthsense_camera_node
  ${catkin_LIBRARIES} ${DEPTHSENSE_LIBRARY}
)

Originally posted by Myzhar with karma: 541 on 2015-02-24

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by gvdhoorn on 2015-02-24:
(a bit off topic) Not sure about its current status, but you might be interested in the softkinetic package.

$\endgroup$

Your Answer

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