Extending torchscript with custom c++ operators,But use default

Hi, all, when I tried Extending torchscript with custom c++ operators as the instrument https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html.

I compiled the C++ op succeed, but when I use it in pytorch, I got this error:

build/libwarp_perspective.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

I think it is something error about C++11, because, I umcomment all the thing about Opencv, the error is still there.

anyone could help me? that very nice for you !!

This is a C++ ABI problem. Please share with me:

  • What OS you are running on,
  • What compiler version,
  • What PyTorch version

Also, if you can, please run the build with make VERBOSE=1 (where you previously typed `make) and paste the output here.


thx for your reply
I run it:

  • ubuntu16.04
  • gcc 5.4.0
  • Pytorch1.0

How did you build the op? Did you use our CMake? Did you build it yourself? Could you share the build output?