![]() Registered Member ![]()
|
I don't know for some unknown reason i am unable to build a simple ncurses app in kdevelop.
getting the following output /home/kushagra/projects/hello/build> make Linking CXX executable hello CMakeFiles/hello.dir/main.cpp.o: In function `main': /home/kushagra/projects/C++/hello/main.cpp:4: undefined reference to `initscr' /home/kushagra/projects/C++/hello/main.cpp:5: undefined reference to `printw' /home/kushagra/projects/C++/hello/main.cpp:6: undefined reference to `refresh' /home/kushagra/projects/C++/hello/main.cpp:7: undefined reference to `endwin' collect2: ld returned 1 exit status make[2]: *** [hello] Error 1 make[1]: *** [CMakeFiles/hello.dir/all] Error 2 make: *** [all] Error 2 *** Failed *** |
![]() Administrator ![]()
|
Have you added the ncurses include path to the paths CMake instructs gcc/g++ to search?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I am new to kdevelop,cmake but i did that back when i was using codeblocks.By adding -lncurses to the other linker options.
How do i do that in kdevelop? Thanks in advance. ![]() |
![]() Registered Member ![]()
|
Solved the problem thanks for advice.
Edited cmakecache in kate |
![]() Administrator ![]()
|
The proper fix in this case would be to edit CMakeLists.txt, and add the following at the end:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]