how to link to ncurses library in the make file
I would like to link to an external library of C++ ncurses. How I can do this in the make file of ROS? I use Electric.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
asked 2013-07-25 11:00:18 -0500
This post is a wiki. Anyone with karma >75 is welcome to improve it.
I would like to link to an external library of C++ ncurses. How I can do this in the make file of ROS? I use Electric.
Hi there
If you want to use ncurses++ (in electric) you should add the following to your CMakeList.txt:
find_package( PkgConfig REQUIRED )
pkg_check_modules ( ncurses++ REQUIRED ncurses++ )
add_executable ( my_exec path_to_my_exec/my_exec.cpp )
target_link_libraries ( my_exec ${ncurses++_LIBRARIES} )
And then modify the manifest.xml of your package to let know ROS that you are using an external library:
<rosdep name="ncurses++"/>
I hope this helps
Asked: 2013-07-25 11:00:18 -0500
Seen: 1,638 times
Last updated: Jul 25 '13