undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string
场景:在c++调用libtorch库的过程中makefile需要添加-lc10,和-ltorcherror原因:本地编译环境为c++11,gcc版本为7.5,而下载的libtorch并不是c++11编译的,所以会导致库使用不正确解决方法:重新下载libtorch,根据cuda和pytorch版本选在连接下载,参考这位博主博客:https://blog.csdn.net/weixin_43742643/article/details/114156298我的模型是由pytorch1.
原创
2021-04-18 19:51:12 ·
3711 阅读 ·
0 评论