Linker kdevelop链接故障 在KDebug C++项目中添加一个新类后,链接器有一个问题来找到精确的源(Calp.CpP):
在kdevelop接口中没有设置应该链接或不应该链接的文件的选项。如何解决链接问题?需要将源文件添加到CMakeLists.txt文件中的项目中。替换:Linker kdevelop链接故障 在KDebug C++项目中添加一个新类后,链接器有一个问题来找到精确的源(Calp.CpP):,linker,cmake,kdevelop,Linker,Cmake,Kdevelop,在kdevelop接口中没有设置应该链接或不应该链接的文件的选项。如何解决链接问题?需要将源文件添加到CMakeLists.txt文件中的项目中。替换: add_executable(example main.cpp) 与: 应该是这样 add_executable(example main.cpp) set(MySources main.cpp calculation.h calculation.cpp) add_executable(example ${MySources})
add_executable(example main.cpp)
与:
应该是这样
add_executable(example main.cpp)
set(MySources main.cpp calculation.h calculation.cpp)
add_executable(example ${MySources})