CUDA v4.0 with MSVS2008 cannot find CUTIL32D.lib

Hello,

I am an absolute beginner in CUDA. I have bought nVIDIA GTX 480 GPU in hope to improve

some computations. However I cannot make it work (I mean CUDA C). I have followed http://www.programmerfish.com/how-to-run-cuda-on-visual-studio-2008-vs08/,

but without any success. The differences between what I did and tutorial are:

I have checked following rules:

CUDA Driver API Build Rule (v4.0)

CUDA Runtime API Build Rule (v4.0)

instead of given in tutorial: cuda.rules which I do not have with my version of CUDA Toolkit

I didn’t include CUTIL32D.lib because I simply do not have it on my computer,

nor I have cutil_vs2008.sln which was mentioned in one of the posts.

I am using Win7 x64 however for now I am trying to build Win32 console application and so I have

included paths to lib, bin, include to x32 versions of libraries.

I have searched forum but none of the posts somehow connected to my problem did provide solution.

I have copied rules to MSVS 2008 folder.

The program I am trying to run:

#include "stdafx.h"

#include <cuda.h>

__global__ void HelloGPU(void){} 

int _tmain(int argc, _TCHAR* argv[])

{

	HelloGPU<<<1,1>>>();

	return 0;

}

The errors I get:

1>Compiling…

1>HelloWorld.cpp

1>…\cuda\helloworld\helloworld\helloworld.cpp(7) : error C2144: syntax error : ‘void’ should be preceded by ‘;’

1>…\cuda\helloworld\helloworld\helloworld.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>…\cuda\helloworld\helloworld\helloworld.cpp(11) : error C2059: syntax error : ‘<’

Thanks in advance for help,

Regards

Ok, so I reinstalled drivers, and tools. Demo programs work, they detect my GPU etc.
Now I have cutil_vs2008.sln but I have no idea how to make a *.lib out of it.
Solution builds (it is successfull), but no LIB or DLL is created :verymad:

Still I cannot compile any demo programs, due to lack of cutil.lib.

Anyway, it is written that I don’t really need cutil.lib for CUDA programming.
So the question: ‘Why MSVS 2008 doesn’t recognize CUDA C HELLO WORLD code?’ still remains.

Why it is so hard to use CUDA with MSVC++ which is (so I heard) supported by nVIDIA CUDA?
Why couldn’t it work as easily as Qt for MSVS? :wallbash:

I recently set up CUDA 4.0 with visual studio 2008 (but on a 32-bit system), so I definitively feel your pain. Although I never had this exact problem, I believe to generate your cutil32/64.lib file(s), you have to build the cutil project, and specify what sort of output you’d like from it. You should be able to select in the Project->Properties, then under Configuration Properties->General->Configuration Type. Double check that this is set to generate a .lib file (the other options are .exe, .dll, and some others I can’t remember).