esp-idf examples工程路径变更,编译报错

问题:

编译过的工程会生成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目录,重新编译。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值