Cuda 5.5 and VS2012 intellisense problems

Aug 13, 2013 at 1:52 PM
Edited Aug 14, 2013 at 8:34 AM
I notice that with VS2012 Intellisense doesn't work as VS2010,
in specific i have to change directive as the follwing in order to have intellisense working correctly in vs2012 (after a lot of try this should work)
//***************START Includes for IntelliSense**********************
#if !defined(__INTELLISENSE_ON) //only defined to have collapsable section.
#define __INTELLISENSE_ON
#define _SIZE_T_DEFINED
#define __THROW
#if !defined(__cplusplus)
#define __cplusplus
#endif
#include "float.h"
#include <cuda.h>
#include <device_launch_parameters.h>
#include <builtin_types.h>
#include <vector_functions.h>
#include <vector_types.h>
#include "include/helper_print.h"  
#if !defined(__CUDA_INTERNAL_COMPILATION__)
#define __CUDA_INTERNAL_COMPILATION__
#endif
#include <math_functions.h>
#include <math.h>
#include "include/helper_math.h"  
#if !defined(__CUDACC__)
#define __CUDACC__
#endif
#include <texture_fetch_functions.h>
#include <device_functions.h>
#endif
//***************END Includes for IntelliSense**********************
If i follow method explained in section documentation with VS2012 intellisense won't work. If not define CUDACC intellisense work but on texture there are errors.
It's a very strange behaviour that i can't explain. I search on internet but with no luck.

Notice that also Cuda 5.5 Toolkit example have problems with intellisense.
Also $(CUDA_INC_PATH) is wrong, a "\" is missing. I use $(CUDA_PATH)\Include.
What else... ah i installed last nsight version and in start project vs2012 i choose the cuda5.5 template. Driver are the right ones..
by the way compilation and debug is ok.

Hope can help.
Andrea.
Coordinator
Aug 15, 2013 at 6:26 PM
I haven't switched to VisualStudio 2012 yet, so I have no experience with it. But looking at the cuda sample project files, it seems that Visual Studio 2012 support is only for the IDE, not the tool chain. All samples still use the old Visual C++ compilers from Visual Studio 2010. I guess, if you set your tool chain back to v100, IntelliSense will work again.