problems with textures

I am using CUDA 4.0 in Visual studio 2010 with parallel Nsight 2.0

My working program in visual studio 2008 is showing errors in new version.

texture<int, 1, cudaReadModeElementType> texref;

In this line the compiler is giving error called texture is not a template. It is underlined in red color like its not at all identified by visual studio. even tex1D is underlined in red color.

i tried including all header files i know

#include “cuda_runtime.h”
#include <cuda.h>
#include “texture_fetch_functions.h”
#include “texture_types.h”
#include “cuda_texture_types.h”

and nothing helps. so which header file should i include to get this texture recognized by visual studio.

Please help…


did you also update CUDA from 3.x to 4.0? Review all the include path into your framework to check if all them point to the correct location.

Hope this help.