Win 7 x64 + CUDA 2.2 + VC++ 2008 Problem Having trouble with linking.

Hey,

I’m a beginner trying to set up a coding environment for CUDA. I have a GeForce 8400M GS, Windows 7 x64 and the 64bit version of CUDA (Driver, toolkit, SDK). The precompiled examples in the SDK run just fine on my machine. The problem is compiling the example source code.

I installed Visual C++ 2008 Express Edition and opened the template which comes with the SDK. In VC++, next to the little green ‘start debugging’ button, there are the various compiler modes (Debug, EmuDebug, etc.). Next to that is the “Win32” or “x64” option. The little green button grays out when I select x64. When I try to compile in Win32 mode I get the following output:

1>------ Build started: Project: transpose, Configuration: Debug Win32 ------

1>Performing Custom Build Step

1>nvcc fatal   : Visual Studio configuration file '(null)' could not be found for installation at 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..'

1>Linking...

1>LINK : fatal error LNK1181: cannot open input file 'cutil32D.lib'

1>Build log was saved at "file://c:\ProgramData\NVIDIA Corporation\NVIDIA CUDA SDK\projects\transpose\Debug\BuildLog.htm"

1>transpose - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I’ve looked around the forum with not much success. Could anyone please direct me in the correct direction?

I faced similar problem and here is a partial solution:

cd to c:\ProgramData\NVIDIA Corporation\NVDIA CUDA SDK\common
open cutil_vc90 solution in VC++ 2008
Select Debug and win32 and then click rebuild all.
Now change settings to Release and again click rebuild all

You will now find the missing cutil32.dll and cutil32D.dll files under c:\ProgramData\NVIDIA Corporation\NVDIA CUDA SDK\common\lib

Now try to build one of the SDK sample projects. The original link error related to cutil32.dll will go away.

However, now I am getting another link error:

1>deviceQuery.obj : error LNK2019: unresolved external symbol _cudaGetDeviceProperties@8 referenced in function _main
1>deviceQuery.obj : error LNK2019: unresolved external symbol _cudaGetDeviceCount@4 referenced in function _main

He,
I have Windows 7 64bit, and I have installed SDK 2.2 x86 and I used in Visual Strudio 2008 C++ Win32 compiler, becuase the x64 didn’t work. the project that I compiled win Win32 they work without problem!!!

so day ago, I upgrade the SDK x86, the SDK x64 has the same problem as above, I wanted 2.3, the driver it is ok non problem but I have problem in Visual 2008 C++ with Win32 I don’t know!!!

Maybe I will try to use Eclipse perhaps it works!!!

bye