CMake Error at CMakeLists.txt:51 (add_library): Cannot find source file:

[cmake] CMake Error at CMakeLists.txt:51 (add_library):
[cmake]   Cannot find source file:
[cmake] 
[cmake]     src/System.cc
[cmake] 
[cmake]   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
[cmake]   .hxx .in .txx
[cmake] 
[cmake] 
[cmake] CMake Error: CMake can not determine linker language for target: ORB_SLAM2
[cmake] CMake Error: Cannot determine link language for target "ORB_SLAM2".
[cmake] -- Generating done

编译时出这个错误,因为cmakelist.txt中add_library()中包含的是src/System.cc,而我实际文件是src/System.cpp,后缀不一样,当然找不到(虽然.cc文件等同于.cpp文件,但是毕竟一个.cc,一个.cpp,名字不一样)。

你可能感兴趣的:(vscode,slam)