编译 CUDA 项目时无法打开 cpp1.ii 文件

发布于 2024-09-17 08:38:39 字数 1447 浏览 5 评论 0原文

过去几个月,我一直在 64 位 Windows 7 安装上使用 CUDA 以及 Visual Studio 2008。最近,我转向 32 位 Windows 7 安装,并更新了我的显卡(之前是 8600GTX)现在是GTX465。我已经安装了相关的驱动程序和CUDA 3.1工具包,并且仍在使用VS2008。

不知何故,如果我尝试编译之前使用的相同 Visual Studio 项目,我会在构建窗口中得到以下输出:

1>------ Build started: Project: CUDAServicenew, Configuration: Debug Win32 ------
1>Performing Custom Build Step
1>CUDAHelloWorld.cu
1>Catastrophic error: cannot open source file      "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii": not a regular file
1>1 catastrophic error detected in the compilation of "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii".
1>Compilation terminated.
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
1>Build log was saved at "file://c:\wamp\www\server_root\GPU_stitcher_live\SiftGPU\CUDAServicenew\CUDAServicenew\Debug\BuildLog.htm"
1>CUDAServicenew - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我使用了自定义构建规则,如下所示:

“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE   D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Od,/Zi,/RTC1,/MTd --ptxas-options -v - I”$(CUDA_INC_PATH)” -I./ -o $(ConfigurationName)\CUDAHelloWorld.obj CUDAHelloWorld.cu

即使我尝试编译 SDK 示例,也会发生这种情况由 NVIDIA 提供。我不明白为什么 cpp1.ii 文件没有被打开。我在这里做错了什么?任何帮助将不胜感激。

I've been using CUDA for the past couple of months on a 64-bit Windows 7 installation along with Visual Studio 2008. Recently I shifted to a 32-bit Windows 7 installation and also updated my graphics card, which earlier was a 8600GTX and now is a GTX465. I've installed the relevant driver and the CUDA 3.1 toolkit, and am still using VS2008.

Somehow if I try and compile the same Visual Studio projects I'd used earlier, I get the following output in the build window:

1>------ Build started: Project: CUDAServicenew, Configuration: Debug Win32 ------
1>Performing Custom Build Step
1>CUDAHelloWorld.cu
1>Catastrophic error: cannot open source file      "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii": not a regular file
1>1 catastrophic error detected in the compilation of "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii".
1>Compilation terminated.
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
1>Build log was saved at "file://c:\wamp\www\server_root\GPU_stitcher_live\SiftGPU\CUDAServicenew\CUDAServicenew\Debug\BuildLog.htm"
1>CUDAServicenew - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've used a custom build rule as shown below:

“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE   D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Od,/Zi,/RTC1,/MTd --ptxas-options -v - I”$(CUDA_INC_PATH)” -I./ -o $(ConfigurationName)\CUDAHelloWorld.obj CUDAHelloWorld.cu

This happens even when I try to compile the SDK samples provided by NVIDIA. I can't understand why the cpp1.ii file is not being opened. What is it that I'm doing wrong here? Any help would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

病女 2024-09-24 08:38:39

只是为了检查一些随机(即不太可能)的想法...

  1. 您安装了 32 位工具包吗?
  2. 您是否以管理员身份运行 VS?
  3. C:\Windows\TEMP 可写吗?
  4. 你有磁盘空间吗?

VS2005 始终需要以管理员身份运行(即使没有 CUDA),而 2008 不太严格,但某些操作需要以管理员身份运行,因此只需检查即可。

Just to check a few random (i.e. unlikely) ideas...

  1. Did you install the 32-bit toolkit?
  2. Are you running VS as administrator?
  3. Is C:\Windows\TEMP writeable?
  4. Do you have disk space?

VS2005 always needed to be run as administrator (even without CUDA) and while 2008 is less strict it is required for some operations, so just checking.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文