一、问题描述
CMake Error at CMakeLists.txt: (add_executable):
Cannot find source file:
…/src/rs-capture.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt: (add_executable):
No SOURCES given to target: xxx
二、解决办法
将文件hello_vscode_c.c改为hello_vscode_c.cpp
只有cpp才能编译