C extension for radon transform

I am trying to implement a C extension of radon transform for pytorch source code. However, when I try to build it, a link error pops

_th_radon.obj : warning LNK4197: export 'PyInit__th_radon' specified multiple times; using first specification
   Creating library .\Release\_th_radon.lib and object .\Release\_th_radon.exp
_th_radon.obj : error LNK2001: unresolved external symbol cpu_radon
th_radon.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_data
th_radon.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_size
.\_th_radon.pyd : fatal error LNK1120: 3 unresolved externals
cffi.VerificationError: LinkError: command 'D:\\Programs\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120

I have no idea what happened. The evironment of my PC is

Windows 10, 
Visual Studio 2015,
PyTorch 0.4.1
Python 3.5.4

Any suggestion is appreciated.
It is said that the ATen Library in PyTorch 1.0 is better see here, however Iā€™m not clear how to convert the code using cffi to the CppExtension.

Thanks for your help.

1 Like

Hi, thanks for your attention. I have made it by referring to an excellent example mask_rcnn_benchmark.
Thanks again.

1 Like

could you please tell me how to solve this problem?