问题:
编译过的工程会生成build目录;如果移动已编译的工程到新的路径,需要删掉build目录,重新编译,否则会因路径不对报错:
CMake Error: The current CMakeCache.txt directory F:/learn/prj/hello_world/build/CMakeCache.txt is different than the directory f:/espressif/esp-idf/examples/get-started/hello_world/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "F:/learn/prj/hello_world/CMakeLists.txt" does not match the source "F:/espressif/esp-idf/examples/get-started/hello_world/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
The terminal process failed to launch (exit code: 1).
解决:
删掉build目录,重新编译。