简体   繁体   English

链接:致命错误 lnk1181:无法打开输入文件 'id=2.obj'

[英]LINK: fatal error lnk1181: cannot open input file 'id=2.obj'

I'm trying to compile cudamat in my Windows 10, by using VS2015 x64 native tools command prompt.我正在尝试使用 VS2015 x64 本机工具命令提示符在我的 Windows 10 中编译 cudamat。 I've already installed Cuda toolkit 8 as well as Visual Studio 2015 with MSVC compiler.我已经安装了 Cuda 工具包 8 以及带有 MSVC 编译器的 Visual Studio 2015。 After downloading cudamat, I gave the following command in that directory:下载 cudamat 后,我​​在该目录中给出了以下命令:

python setup.py install python setup.py 安装

When it tries to build cudamat.libcudamat extension, I get the following error by the linker:当它尝试构建 cudamat.libcudamat 扩展时,链接器出现以下错误:

fatal error lnk1181: cannot open input file 'id=2.obj'致命错误 lnk1181:无法打开输入文件 'id=2.obj'

error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\bin\\nvcc.exe' failed with exit status 2错误:命令“C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\bin\\nvcc.exe”失败,退出状态为 2

Could someone help me?有人可以帮助我吗?

If you have this problem, we can assume that earlier compilation of cudamat.obj and cudamat_kernels.obj were succesful.如果你有这个问题,我们可以假设早期的 cudamat.obj 和 cudamat_kernels.obj 编译是成功的。

To make it work, you'll have to do it manually as described here .要使其工作,您必须按照此处所述手动完成。

Long in short:长话短说:

  1. First you have to go to directory where you have Cudamat downloaded ( git clone https://github.com/cudamat/cudamat.git ).首先,您必须转到下载 Cudamat 的目录( git clone https://github.com/cudamat/cudamat.git )。
  2. Copy cudamat folder (the one where you can find cudamat.py, learn.py and init.py) to your python site-packages folder (you can check the path using python -c "import sys; print(sys.path)" )将 cudamat 文件夹(您可以在其中找到 cudamat.py、learn.py 和 init.py 的文件夹)复制到您的 python 站点包文件夹(您可以使用python -c "import sys; print(sys.path)"检查路径python -c "import sys; print(sys.path)" )
  3. Now you will have to go to this folder and compile dll's manually.现在,您必须转到此文件夹并手动编译 dll。 To do this you have to execute few commands:为此,您必须执行一些命令:

    nvcc -c -O -o cudamat.obj cudamat.cu

    nvcc -c -O -o cudamat_kernels.obj cudamat_kernels.cu

    nvcc --shared -o libcudamat.dll cudamat.obj cudamat_kernels.obj -lcublas

    and then repeat the process changing cudamat to learn and libcudamat.dll to libcudalearn.dll然后重复将 cudamat 更改为学习和 libcudamat.dll 更改为 libcudalearn.dll 的过程

  4. This should already work but if not, you have to tweak your python paths so it can see your new library这应该已经工作了,但如果没有,你必须调整你的 python 路径,以便它可以看到你的新库

Alternatively, you can try also: pip install http://github.com/f0k/cudamat/archive/simplify-compile.zip或者,您也可以尝试: pip install http://github.com/f0k/cudamat/archive/simplify-compile.zip

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 链接:致命错误 LNK1181:无法打开输入文件“db2cli64.lib” - LINK : fatal error LNK1181: cannot open input file 'db2cli64.lib' 链接:致命错误LNK1181:无法打开输入文件'gpuarray.lib' - LINK : fatal error LNK1181: cannot open input file 'gpuarray.lib' 在目录['lib']中找不到库'radial'...链接:致命错误LNK1181:无法打开输入文件'radial.lib' - could not find library 'radial' in directories ['lib']…LINK : fatal error LNK1181: cannot open input file 'radial.lib' 致命错误 LNK1181:安装 matplotlib==3.0.3 时无法打开输入文件“png.lib” - Fatal Error LNK1181: cannot open input file 'png.lib' while installing matplotlib==3.0.3 链接:致命错误LNK1181:为python安装scikits.bvp_solver模块时无法打开输入文件'mingw32.lib' - LINK: fatal error LNK1181: cannot open input file 'mingw32.lib' when install scikits.bvp_solver module for python 无法构建boost_python示例代码“致命错误LNK1181:无法打开输入文件'boost_python.lib'” - Failed to build boost_python example code “fatal error LNK1181: cannot open input file 'boost_python.lib'” KivEnt安装:致命错误LNK1181无法打开输入文件'glew32.lib' - KivEnt installation: Fatal error LNK1181 can't open input file 'glew32.lib' LNK1181: 无法打开输入文件“m.lib” - LNK1181: cannot open input file 'm.lib' 使用cython构建错误| LINK:致命错误 LNK1181 - Build error using cython | LINK : fatal error LNK1181 在Windows中使用C绑定构建Python包(VC90)会导致LNK1181致命错误 - Build Python package with C bindings in Windows (VC90) causes LNK1181 fatal error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM