- 把外部
.c文件放到.cpp工程下的 main 文件夹 - 然后在
.cpp工程下声明.c文件下的 hello_main 函数 - 同时在 cpp 工程的
CmakeLists.txt文件下加上.c文件 - 最后在
.cpp工程下调用 hello_main 函数即可
可基于 esp-idf/examples/storage/nvs_rw_value_cxx 例程来测试 , 例如:
1 将 .c 文件放到 .cpp main 工程目录下

2 在 .cpp 工程下以 extern "C" 定义一下 .c 文件 main 函数

3 在 .cpp 工程的 CmakeLists.txt 文件下加上 .c 文件

4 在 .cpp 工程下调用 .c main 函数




![[element plus] 对话框组件再封装使用 - vue](https://img-blog.csdnimg.cn/50039c98df4a4de7ba40b99f4fc40191.png)














