Building CUDA on XP x64 Something wrong with the build path?

I’ve been trying to get CUDA working on my XP x64 box for about a week now. I’ve downloaded and installed Visual Studio 2005 C++ Express, and the newest (version 2.0) SDK and Toolkit. For some reason, I still can’t even compile the SDK projects.

I posted this in another thread I found, but that forum (the Vista forum) doesn’t seem to be very active, and I’m not on Vista anyway.

Note that I also tried rebuilding the cutil project as someone had suggested, and that didn’t work. I also tried copying cutil32.dll and cutilD32.dll into the C:\CUDA\lib folder, and then the compiler started throwing errors saying it couldn’t find the intermediate object files (*.obj) for the project (which I assume had just been compiled by nvcc).

The only thing I can think of is that something is wrong with the build paths, such that nvcc can’t find the correct libraries, and VC++ can’t find the object files generated by nvcc.

I really want to get to porting some of my code to CUDA, so if you have any ideas, I’d greatly appreciate them.

Here’s my post from the other forum:

Bump for an answer?

bump from my side

I’m facing the exact same problems

hope we get an answer soon from someone

Hmm I got it working at last

get rid of your system of Nvidia cuda sdk and toolkit and driver etc all things

and also visual studio.

removed all the leftover folders that are in the system drive after uninstalling them.

and install everything from scratch and i donno why
but its working now

i did not have to install any cuda rules etc or anything

dilipreddi, I’m glad to see you got it working. I’d like to follow your method, but the last time I tried to uninstall the CUDA SDK/Toolkit (when I was upgrading from 2.0 Beta to 2.0 Final), the uninstaller always hung and never completed, so I’m not sure if this will work for me.

I’m going to sit down this afternoon and try to work out what is going on. Now that I know how you got it working though, the source of the problems is somewhat narrowed down (it’s got to be a configuration setting or path that is wrong/missing).

After looking at the problem for a bit today, it looks as though the command-line macros $(CUDA_BIN_PATH), (CUDA_INC_PATH), and (CUDA_LIB_PATH) are not defined for Visual Studio. However, I can see them in the system variables settings (Right-click My Computer->Properties->Advanced->Environment Variables->System Variables).

I’ve been searching for an hour, and I still can’t find a way to set the macros in Visual Studio. I’ve even tried editing vsvars32.bat, to no avail. Anyone know how I can set these variables to get CUDA working?

EDIT: Nevermind, just saw your other post…

Anyway, I still haven’t got it working…there’s got to be some other problem here besides the macros…

Well, I uninstalled everything, and reinstalled my old copy of Visual Studio 2005 (I was trying to use Visual C++ Express 2005). Installed the toolkit and SDK. Still didn’t build.

I went through the Visual Studio options (Tools->Options) and had to add a bunch of reference paths so that Visual Studio could find the CUDA header files and libraries, and now it’s building like it should.

However, when I try to actually run the compiled program, I get an error saying that the application couldn’t find the ‘cutil64D.dll’. I understand that copying the DLL into the same folder as the compiled executable should fix it, but I was wondering if there was a setting in Visual Studio that I needed to set in order for this to work ‘automatically’ (without having to copy over DLL’s each time). I searched and found one post with this, but the poster never said exactly how it was fixed…

In my view, it’s the environment errors.
check the environment setting.

did you not build cutil64D?