windows link error #18
Comments
I fixed the error with following step:
but |
hi, have you sort out this problem? i just got the same question as yours |
I got the same error. Is there anyone know how to fix it? |
When trying to compile C extension, I got error( VerificationError: CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2), and tried all the methods mentioned, but all can't fix it. Is there anyone know how to fix it? generating C:\Users\liyang\AppData\Local\Temp\tmp65k1yok8_my_lib.c File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile File "I:/models/ops/learn/11/build.py", line 38, in File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi_init_.py", line 189, in build File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi_init_.py", line 111, in _build_extension File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\api.py", line 697, in compile File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\recompiler.py", line 1520, in recompile File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\ffiplatform.py", line 22, in compile File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\ffiplatform.py", line 58, in _build VerificationError: CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2 |
I meet this error too. who knows how to fix it? |
I meet this error too. |
I build this demo according to README, but ran into the following error:
c:\program files\nvidia gpu computing toolkit\cuda\v9.1\include\cuda_fp16.hpp(122): note: 参见“__half”的声明
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\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.1/lib/x64" "/LIBPATH:C:\Program Files\NVIDIA Corporation\NvToolsExt/lib/x64" /LIBPATH:C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\ffi....\lib /LIBPATH:C:\ProgramData\Anaconda3\libs /LIBPATH:C:\ProgramData\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\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.16299.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64" /EXPORT:PyInit__my_lib .\Release_my_lib.obj .\Release\opensource\pytorch_windows\extension-ffi\script\src\my_lib.obj .\Release\opensource\pytorch_windows\extension-ffi\script\src\my_lib_cuda.obj /OUT:._my_lib.pyd /IMPLIB:.\Release_my_lib.lib
正在创建库 .\Release_my_lib.lib 和对象 .\Release_my_lib.exp
my_lib.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_fill
my_lib.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_resizeAs
my_lib.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_isSameSizeAs
my_lib.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_cadd
my_lib_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_fill
my_lib_cuda.obj : error LNK2001: 无法解析的外部符号 "struct THCState * state" (?state@@3PEAUTHCState@@ea)
my_lib_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_isSameSizeAs
my_lib_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_resizeAs
my_lib_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_cadd
._my_lib.pyd : fatal error LNK1120: 9 个无法解析的外部命令
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\distutils_msvccompiler.py", line 519, in link
self.spawn([self.linker] + ld_args)
File "C:\ProgramData\Anaconda3\lib\distutils_msvccompiler.py", line 542, in spawn
return super().spawn(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\ProgramData\Anaconda3\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\ProgramData\Anaconda3\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\link.exe' failed with exit status 1120
The text was updated successfully, but these errors were encountered: