Visual Studio 2010: Link error

Hi,

I tried to set up a very simple CUDA project in Visual Studio 2010.

I installed the following software packages:

Visual Studio 2008 (since CUDA still needs to old compiler…)

Visual Studio 2010 (in which I created the project)

CUDA SDK 2.3 Windows 7 64 bit

parallel nsight host and monitor

cuda toolkit 3.2.16 64 bit

I took the project from this page http://blog.cuvilib.com/2011/02/24/how-to-run-cuda-in-visual-studio-2010/

I set the compiler to V 9.0

I selected in build customization “CUDA 3.2 targets and props”

Now I tried to build the project but get the following errors:

I googled a bit and tried to add the header files cutil.h and cutil_inline.h directly in

CUDA C/C++ Properties - Additional include directories - C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\inc;%(Include)

But I still get the same error.
VS2010Test.zip (1.32 MB)

push

Hi, you have linker error. Did you tell VS2010 where to look for CUDA libraries? (Should be under %CUDA_LIB_PATH%)

Edit: Oops accidently typed VS2008 by mistake.

Hi, Thanks for your answer.

It looks like you can specify it in millions of different locations. It’s really complicated, where should I reference it?

It referenced it at the following places:
Property Pages -> CUDA C/C++ -> Source Dependencies and Additional Include Directories

This didn’t help.

In the Linker section:
Additional Library Dependencies

Didn’t help either

In the VC++ Directories section:
Include directories

This didn’t help either

Looks like this is some mess, since it’s not really clear where to specify it.

Hello,

I also tested and get linker errors while compiling the samples…

I tried 2 configurations :

    [*]Windows 7 x64 + VisualStudio 2010 + CUDA 3.2[*]Windows 7 x64 + VisualStudio 2010 + CUDA 4.0 RC

It’s kinda weird since I programmed my own HelloWorld (launching a kernel that makes a simple multiplication) and it works perfectly althought I was using “cutils”.

I tried to execute “deviceQuery_vs2008” from the samples of CUDA 4.0 SDK and :

    [*]It works fine with Visual C++ Express 2008[*]linker errors with VisualStudio 2010

It seems that VS 2010 has a different way to link project files, doesn’t it ?

If anybody can help…