CUDA + Visual Studio = 抑制输出窗口

发布于 2024-07-13 06:24:24 字数 1467 浏览 4 评论 0原文

通常,当我使用 Visual Studio 进行构建时,我会在输出窗格中看到警告和错误,例如

1>------ Build started: Project: pdcuda, Configuration: Release x64 ------
Compiling...
foo.cpp
Linking...
foo.obj : error LNK2001: unresolved external symbol "foo"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我正在使用 CUDA。 升级到 2.1 后,我不再在 Visual Studio 中获得任何有用的输出。 例如,我现在看到的是:

1>------ Build started: Project: pdcuda, Configuration: Release x64 ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

其他详细信息可以在 BuildLog.htm 中找到,但一直寻找该文件很不方便。

有谁知道如何强制 Visual Studio 在其输出窗格中显示输出?

没有帮助的事情:

  • 卸载 CUDA:所有项目中都存在问题
  • 工具 > 选项> 项目与解决方案> 构建并运行> MSBuild 项目构建输出详细程度:更改此下拉列表,即使更改为“诊断”也没有明显的效果。

编辑:其他没有帮助的事情:

  • devenv.exe /resetsettings
  • devenv.exe /resetuserdata

更新(响应 Die in Sente) :它现在正在两台机器中的一台上运行(但我不确定我做了什么来修复它)。 仍然存在问题的计算机安装了 CUDA Visual Studio 向导,该向导以前曾引起过类似问题。 仍然损坏的机器的编译器版本为 15.00.21022.8。 工作机有15.00.30729.1。 进行备份后,我将“C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64”从工作机器转移到损坏的机器上。 我观察到损坏的机器上的行为没有变化。

Normally, when I use Visual Studio to do a build, I see warnings and errors shown in the output pane, e.g.

1>------ Build started: Project: pdcuda, Configuration: Release x64 ------
Compiling...
foo.cpp
Linking...
foo.obj : error LNK2001: unresolved external symbol "foo"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm doing some GPU programming with CUDA. Upon upgrading to 2.1, I no longer get any useful output in Visual Studio. For example, all I now see is:

1>------ Build started: Project: pdcuda, Configuration: Release x64 ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The other details can be found in BuildLog.htm, but it's inconvenient to hunt that file down all the time.

Does anyone know how to force Visual Studio to show the output in its output pane?

Things that don't help:

  • uninstalling CUDA: the problem persists in all projects
  • Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity: changing this pulldown, even to "Diagnostic" has no discernable effect.

EDIT: Additional things that don't help:

  • devenv.exe /resetsettings
  • devenv.exe /resetuserdata

UPDATE (in response to Die in Sente): It's now working on one of the two machines (I'm not sure what I did to fix it though). The machine that's still having problems has a CUDA Visual Studio Wizard installed that has caused similar problems before. The still-broken machine had version 15.00.21022.8 of the compiler. The working machine has 15.00.30729.1. After making a backup, I transferred "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64" from the working to the broken machine. I observe no changes in behavior on the broken machine.

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

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

发布评论

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

评论(6

那片花海 2024-07-20 06:24:24

我也有同样的问题,但是没有CUDA。 今天,Visual Studio 决定不再显示任何构建消息。 它工作得很好,然后我的一个构建就停止了工作。 现在,这个问题在我的所有项目中都存在,并且在重新启动后仍然存在。 我还在 buildlog.htm 中看到了正确的消息。 这太可笑了!

编辑:哦,我使用添加/删除程序进行修复,现在它又可以工作了! 是的!

I have exactly the same problem, but without CUDA. Today Visual Studio just decided it wasn't going to show any build messages anymore. It was working fine, then one of my builds it just stopped working. The problem persists over all my projects now, and persists over reboots. I also see the correct messages in buildlog.htm. This is ridonkulous!

EDIT: Ooh, I used the add/remove programs to do a repair, and now it works again! Yeah!

月亮坠入山谷 2024-07-20 06:24:24

您是否尝试过重置 IDE
devenv.exe /重置设置
或者
devenv.exe /重置用户数据

did you tried to reset IDE
devenv.exe /resetsettings
or
devenv.exe /resetuserdata

同尘 2024-07-20 06:24:24

我最近还安装了 CUDA 2.1(我相信是在 2.0 之上)。 CUDA 2.1 的默认安装将 SDK 从

C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\

移动到

C:\Documents and Settings\All Users\Application Data\NVIDIA Corportation\NVIDIA CUDA SDK\

这最初给我带来了一些问题。 您的所有路径都正确解析吗?

I also recently install CUDA 2.1 (on top of 2.0 I believe). The default installation for CUDA 2.1 moved the SDK from

C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\

to

C:\Documents and Settings\All Users\Application Data\NVIDIA Corportation\NVIDIA CUDA SDK\

which initially caused me some problems. Are all of your paths resolving correctly?

蓝海 2024-07-20 06:24:24

这听起来可能是一个遥远的建议。 获取 CUDA SDK 并使用其中的示例 CUDA-C++ 项目尝试您的代码。 也许 CUDA v2.1 的构建规则发生了一些变化。

This might sound like a far out suggestion. Get the CUDA SDK and try your code with the sample CUDA-C++ project in there. Maybe something changed in the build rules for CUDA v2.1.

夜清冷一曲。 2024-07-20 06:24:24

如果您转到“工具”->“选项”->“项目和解决方案”->“构建并运行”。 最后一个属性是“MSBuild 项目构建输出详细程度”。 它默认为最小,将其更改为正常,构建消息将显示在输出窗口中。

这还允许任何 输出显示在 Visual Studio 构建输出窗口中。

If you go to Tools->Options->Projects and Solutions->Build and Run. Last property is "MSBuild Project build output verbosity". It defaults to Minimal, change it to normal and the build messages will show up in Output window.

This also enables any <Message Text="test message"></Message> output to show up in Visual Studio Build Output Window.

夏末的微笑 2024-07-20 06:24:24

最终解决方案:重新安装操作系统。

Final solution: reinstall the OS.

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