strange problem! error expect a ";"

Hello, I am new to CUDA. I got a strange compiler error!

part of the code:

__global__ void stream_kernel (int pitch, float *f1_data, float *f2_data,

        float *f3_data, float *f4_data, float *f5_data,

        float *f6_data, float *f7_data, float *f8_data)

    // CUDA kernel


    int i, j, i2d;

i = blockIdx.x*TILE_I + threadIdx.x;

    j = blockIdx.y*TILE_J + threadIdx.y;

i2d = i + j*pitch/sizeof(float);

// look up the adjacent f's needed for streaming using textures

    // i.e. gather from textures, write to device memory: f1_data, etc

    //Fred: How to deal with BC here?

    f1_data[i2d] = tex2D(f1_tex, (float) (i-1)  , (float) j);

    f2_data[i2d] = tex2D(f2_tex, (float) i      , (float) (j-1));

    f3_data[i2d] = tex2D(f3_tex, (float) (i+1)  , (float) j);

    f4_data[i2d] = tex2D(f4_tex, (float) i      , (float) (j+1));

    f5_data[i2d] = tex2D(f5_tex, (float) (i-1)  , (float) (j-1));

    f6_data[i2d] = tex2D(f6_tex, (float) (i+1)  , (float) (j-1));

    f7_data[i2d] = tex2D(f7_tex, (float) (i+1)  , (float) (j+1));

    f8_data[i2d] = tex2D(f8_tex, (float) (i-1)  , (float) (j+1));


at the line

int i, j, i2d;

there do have a ‘;’, but the compiler gave a error: error: expected a ";"

Any reply will be appreciated!

Show us your Makefile.
Are you compiling cu files using nvcc?