views:

2003

answers:

8

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.

A: 

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

michael
good ideas...unfortunately they don't fix it either.
Mr Fooz
A: 

It is compler and linker errors that you're not seeing? Or some other tool in the build?

How has the format of the error messages changed? IIRC, Visual Studio is just scanning the build log for the strings "error" and "warning". Maybe the syntax of the errors has changed enough to defeat the parser?

Does the CUDA SDK install replace or patch any compiler modules? You can check this by running "cl -Bv".

Die in Sente
I'm missing output from all tools (compiler, linker, custom build steps, etc.). I see exactly one line per project that's built plus a single line summarizing what was built / skipped / failed / etc.
Mr Fooz
If I hunt down the correct BuildLog.htm files, the formatting there is unchanged. Normally, the output window has the warnings and errors streamed to it. BuildLog.htm is untouched until a project's built is done, then it's dumped all at once.
Mr Fooz
I don't think that the SDK patches the compiler modules, but I did find an older version on the broken machine (see the update in the OP). Copying the bin directory from a working machine doesn't seem to help.
Mr Fooz
A: 

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?

Zachary Garrett
I've able to resolve the paths correctly. Oddly, it's installed in the hidden directory tree C:\ProgramData for me. When I fix the bugs and linker issues in my program, I can get it to build. I just don't see any build messages like nvcc results, warnings, errors, etc.
Mr Fooz
I thought perhaps Visual Studio was having trouble locating nvcc and not being descriptive about it.The BuildLog.htm contains all the errors that normally would be displayed in the output? What does your .cu build rule look like?
Zachary Garrett
Yes, the BuildLog.htm contains all the errors and warnings that would have normally been displayed. If I fix the errors, the build works (but the IDE output is still suppressed). The build rule shows up as "CUDA Build Rule v2.1.0". Its command line contains nothing surprising.
Mr Fooz
A: 

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.

Ashwin
Good idea. Unfortunately, running the cppIntegration sample does not restore the IDE output.
Mr Fooz
A: 

Hey,

how do u get this colored red errors in the output window of studio ? Is it a new feature or tool ? Im using VS2005 and i like to see this help with colors also in my output window, so i better can recognize errors if they are red ?

Can anybody tell me, because i know how to set the color of the output window in studio->options ... at all, but not the red warning and error numbers. Would be great if anyone can help me thx

ben

AFAIK, there is no coloring of errors in the output window. It's just mildly-hyperlinked text. The color coding you see above is done by stackoverflow.
Mr Fooz
A: 

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.

+1  A: 

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!

gfyffe
A: 

Final solution: reinstall the OS.

Mr Fooz