undefined reference to `MNN::CV::imread
时间: 2023-09-17 17:10:30 浏览: 262
引用中的代码片段是一个使用MNN库的示例,它并没有直接使用MNN的imread函数,而是使用了OpenCV的imread函数来读取图片。所以在编译过程中出现undefined reference to `MNN::CV::imread的错误,可能是因为你的代码中缺少了对MNN库的链接。你可以尝试在CMakeLists.txt中添加对MNN库的链接,类似于引用中对OpenCV库的链接。具体来说,你可以修改CMakeLists.txt如下:
target_link_libraries(helloworld -lMNN)
这样可以将MNN库链接到你的项目中,解决undefined reference to `MNN::CV::imread的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [MNN和NCNN安装记录](https://blog.csdn.net/qq_19784349/article/details/93226763)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Yolo-FastestV2在树莓派4B上的MNN移植记录](https://blog.csdn.net/weixin_39266208/article/details/122131303)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文