Compiling samples on Windows 7 x64 w/ VS 2008

Just installed 2.1 on my Windows 7 x64 machine. Very frustrating experience, but after an hour I figured out the following:

PROBLEM #1: Building the CUTIL project to x64 (pre-req for most samples) by default gives the following error:

WORK-AROUND: VS 2008 must be “Run as Administrator” in order to allow the correct file writing permissions.

PROBLEM #2: The samples by default won’t compile to Win32 - if you try, you’ll get the following error:

WORK-AROUND: The build needs to be set to x64. This is annoying…my current app needs to be built to Win32. Does anyone know how to implement this?

PROBLEM #3: Once the problems above are averted, you’ll get the following linker error:

WORK-AROUND: This a Windows 7 Beta-specific issue, as pointed out by John Robbins. Of the two suggested solutions, I chose to change the linker Randomized Base Address flags to DYNAMICBASE (versus DYNAMICBASE:NO). Note: you can “shift-select” all project files in the samples and modify this option for all projects simultaneously.

I don’t think it should be this difficult to get up and running. #3 is obviously not a supported environment, but #s 1 and 2 seem fairly mainstream. I’m not a “seasoned” native code developer, and that’s my point, really…if NVidia wants to cast its net wide it shouldn’t it try a little harder to court noob devs? And why again did it take this long to support VS 2008?

That’s because the 64-bit toolkit makes 64-bit object files. You need the 32-bit toolkit for WIN32-bit apps. There are some posts on how to set up both the 64-bit and 32-bit toolkits, just search on the forums.