Link error with roi_align and nms with Visual Studio 2017
See original GitHub issueWhen calling build.py for “roi_align”, I am getting the following link error with Visual Studio 2017. I am not sure why, TH.h contains only template definitions, so there shouldn’t be any library dependency right? Same problem with nms.
Creating library .\Release\_crop_and_resize.lib and object .\Release\_crop_and_resize.exp LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_zero crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_data crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_resize4d crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_size [....]
The linker call is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/lib/x64" "/LIBPATH:C:\Program Files\NVIDIA Corporation\NvToolsExt\/lib/x64" /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\lib\site-packages\torch\utils\ffi\..\..\lib /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\libs /LIBPATH:D:\stewun\WinPython3.6.5\python-3.6.5.amd64\libs /LIBPATH:D:\stewun\WinPython3.6.5\python-3.6.5.amd64 /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__crop_and_resize .\Release\_crop_and_resize.obj .\Release\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src\crop_and_resize.obj .\Release\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src\crop_and_resize_gpu.obj D:\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src/cuda/crop_and_resize_kernel.cu.o /OUT:.\_crop_and_resize.pyd /IMPLIB:.\Release\_crop_and_resize.lib
Issue Analytics
- State:
- Created 4 years ago
- Comments:6

Top Related StackOverflow Question
I switched to Linux, there it runs without major problems. The real solution would be to port the code to the newest torch version., rewriting the C parts.
Yes, it did not work in windows. In Linux, it works fine.