link ncurses ROS kinetic
Hello everyone !
I know there are already posts about this subject but after many tries I don't know how to resolve this problem.
This is my code "test_ncurses.cpp":
// test_ncurses.cpp
#include <ncurses.h>
int main(int argc, char **argv)
{
initscr();
printw("Hello world");
refresh();
getch();
endwin();
return 0;
}
In the manifest I added these lines :
<build_depend>ncurses++</build_depend>
<run_depend>ncurses++</run_depend>
And in my CMakeLists.txt :
find_package( PkgConfig REQUIRED )
pkg_check_modules ( ncurses++ REQUIRED ncurses++ )
add_executable(test_ncurses src/test_ncurses.cpp )
target_link_libraries(test_ncurses ${catkin_LIBRARIES} ${ncurses++_LIBRARIES})
And when I want to catkin_make my project I get errors :
undefined reference to "initscr"
undefined reference to "printw"
undefined reference to "refresh"
undefined reference to "stdscr"
undefined reference to "wgetch"
undefined reference to "endwin"
Do you have any ideas ?
Thank you in advance !
I'm not sure, but I can imagine that a
+
is not a valid character in a CMake identifier. See cmake-language - Syntax.Can you try using
pkg_check_modules ( ncurses++ REQUIRED ncursespp)
and see if that changes anything?Not working :/