certain samples don't build

I have a working Cuda toolkit install (linux). I can make and run the samples from the command line.

I followed the instructions at “Nsight Eclipse Edition Getting Started Guide” and I can open some samples (eg bandwidth), build them, and run them.

Some of the samples do not build. One example is smokeparticles. The console output at build shows 18 errors. For brevity, here are three that illustrate the pattern:

…/src/particles_kernel.cu(48): error: name followed by “::” must be a class or namespace name

…/src/particles_kernel.cu(48): error: expected an identifier

…/src/particles_kernel.cu(48): error: expected a “;”

There are six lines in particles_kernel.cu that have all three errors. Here is typical example of a code line in the IDE related to the errors: volatile float4 posData = thrust::get(t);

I see that one of the options for creating a new CUDA C/C++ Project is the “Thrust Project.” I am guessing that the sample import option is not properly configuring this sample to use the Thrust library. How do I configure my sample project to fix this?

Sorry about them, looks like samples package was updated at the last moment.

In this particular application the issue is that the particles_kernel.cu is actually used as a header and is not meant to be compiled on its own. Right-click the file, go to properties and select “Build” in the left-hand tree. Check “Exclude resource from build” and recompile the project.

I opened a bug so this issue should be fixed in the next Nsight version.

That worked. Thanks.