CUDA 4.0 and VS 2010 issue

I’m using the command prompt to try and run examples from CUDA by Example. I’m using nvcc 4.0 and the VS 2010 compiler and keep getting the following error:

Microsoft SDKs\Windows\v7.0A\include\objbase.h<239>: error: identifier “IUnknown” is undefined

As well as the following warning:

Microsoft SDKs\Windows\v7.0A\include\objbase.h<239>: warning: expression has no effect

Any help with this issue would be greatly appreciated.

Also, as a breif side-question, how do I change my default nvcc compiler from 3.2 to 4.0 in command prompt?

Thanks!

Hello there… you cannot use directly VC++ 2010 to compile CUDA kernel, you should use VC++ 2008 compiler. This restriction is applied to CUDA 3.2 and CUDA 4.0 (if I remember correctly).

Sorry my mistake: http://www.ademiller.com/blogs/tech/2011/05/visual-studio-2010-and-cuda-easier-with-rc2/ CUDA 4.0 doesn’t require VC 2008 anymore.

Hi there,

did you solve this problem?

I have the same error and cannot figure out a work around.

Cheers,

I think you need vs 2010 professional… are you trying to use the express edition ?

Hey,

I am using the peofessional version with the 7.0a win SDK and still get the same error!

Finding the same error… Hey someone can fix this problem… Programmers ??

I am also facing the same problem. Anybody who has resolved this problem, please provide the solution.

Thanks.