将新类添加到 KDevelop C++ 项目后,链接器无法找到确切的源(在本例中为 calculation.cpp):
-- Build files have been written to: /var/www/C++/fibonacci/build
Scanning dependencies of target fibonacci
Linking CXX executable fibonacci
CMakeFiles/fibonacci.dir/main.cpp.o: In function `main':
/var/www/C++/fibonacci/main.cpp:12: undefined reference to `Calculation::fibonacci(unsigned int)'
/var/www/C++/fibonacci/main.cpp:13: undefined reference to `Calculation::fibonacci_req(unsigned int, unsigned int, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [fibonacci] Error 1
make[1]: *** [CMakeFiles/fibonacci.dir/all] Error 2
make: *** [all] Error 2
*** Failed ***
kdevelop 界面中没有选项来设置应该链接或不链接的文件。如何解决链接问题?