Problem Compiling Kernel Call syntax error: '<'

I am writing my first CUDA program using VS 2005 in Vista x64. The nvcc compilation seems to work fine, but later in the compilation I get the error:

error C2059: syntax error : ‘<’

This is on the line where I call my kernel.

[codebox] dim3 dimBlock(10,1);

dim3 dimGrid(10,1);

newtonMethodKernel<<<dimGrid, dimBlock>>>(d_intensityEstimates, d_firstDerivatives, d_secondDerivatives);[/codebox]

and previously in the file I have

[codebox]#include <cuda_runtime.h>

static global void newtonMethodKernel(float* intensityEstimates, float* firstDerivatives, float* secondDerivatives) { }[/codebox]

Other cuda calls seem to compile fine (cudaMalloc, cudaMemcpy…). It is only when I have the line with the call to the kernel that it complains.

What am I forgetting?

Thanks!

pretty sure you’re not actually compiling with nvcc

Thanks.

It ended up that I was compiling the same file with both nvcc and then C++ because I had the function calling the kernel within an included file from a .cpp file. The C++ compilation obviously complained.

I changed the files that my functions were in to more closely match an example (with extern “C” declarations, etc.) and it now seems to work.