我正在尝试通过PyTorch的C ++ API(Ubuntu 18.04)结合Openfoam(6.0)和PyTorch(1.2)。我正在通过cmake编译代码。我在PyTorch的ABI上遇到麻烦。一些研究表明这是与ABI相关的问题。
如果我设置-D_GLIBCXX_USE_CXX11_ABI = 1,则会得到
undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
如果我使用-D_GLIBCXX_USE_CXX11_ABI = 0,我会得到
data.rel.ro._ZTVN4Foam8OPstreamE[_ZTVN4Foam8OPstreamE]+0x80): undefined reference to `Foam::UOPstream::writeQuoted(std::string const&, bool)'
我有两个问题:
抱歉,不是答案,但是您碰巧解决了这个问题吗?我有同样的问题。