texture error

Hello

I get the following texture error even though cudart.lib and cuda.lib are included as well as the includes in the CUDA toolkit and SDK.

texture g;

syntax error:missing ‘;’ before ‘<’

The headers I am including are:
#include <cuda_runtime.h>
#include “texture_types.h”
#include “cuda_texture_types.h”
#include <cuda.h>
#include “cuda_runtime_api.h”

I believe the “cuda_texture_types.h” seems to have the texture declarations.

Would anyone know why?

thanks

The error message suggests you are using a compiler other than nvcc.

Posters that desire debugging assistance are advised to post a minimal complete self-contained reproducer code plus the exact compiler command line that was used to build the code.

BTW, the CUDA compiler will automatically include CUDA-specific header files, no need to include them by hand.