Kernel compilation problem: is not a function or static data member?

Hello, everybody.

My problem is with the compilation of a .cu file. I have a file called cuda_features.h which has some kernels and a lot of device functions (source code, not only headers). I have intention to share them between two Visual Studio 2010 projects on same solution. The first is the main project and the second is the unit tests project. The main project has the file and compiles well. For the unit test project I wrote a file which has an extern C function testRootValidation() that calls a kernel on file cuda_features.h. I’ve added its path to the Additional Include Directories and write the #include directive. When I try to compile the tests project the compiler complains about a kernel (processFeatureTests) on file cuda_features.h. compilation gives this message:

cuda_features.h(1135): error : "processFeatureTests" is not a function or static data member

This is the file with kernel caller function (validateRoots() is on cuda_features.h):

#include "RootValidationTest.h"

#include "cuda_features.h"

extern "C" void testRootValidation(void)


	//fTests contains the test data. Each line contains data for 1 test which is formed by 4 points (3 floats for each - total 12 floats).

	float fTests[] = {	1.f , 1.f , 6.f , 6.f , 1.f , 1.f , 1.f , 1.f , 1.f , 2.f , 1.f , 2.f , 

				1.f , 1.f , 6.f , 6.f , 1.f , 1.f , 1.f , 1.f , 1.f , 2.f , 3.f , 2.f , 

				1.f , 1.f , 6.f , 6.f , 1.f , 1.f , 1.f , 1.f , 1.f , 2.f , 4.f , 2.f , 


	PointFeatureTest* tests;

	GPUMALLOC(&tests , sizeof(float) * 36);

	TOGPU(tests , fTests , sizeof(float) * 36);

	validateRoots<256><<<1 , 256>>>(tests);



And this is the trouble maker kernel header (function is too big)

template <int nThreads>

__global__ void processFeatureTests(GPUVertex *d_GL_vertices, GPUVertex *d_deltaPos , uint3 *d_GL_triIndices,

		GPUEdge *d_triEdges , featureTest *featureTests , unsigned int *d_timeOfContact ,

		unsigned int nFeatureTests , unsigned int *tempCurrentVIdx)




Any help will be very appreciated.

Thanks for attention,


Could somebody help me, plesase? I really need to compile this for my tests.