This error message misled me for a while. It was telling me that my templated CUDA kernel was “not a function or static data member” – this after I added a struct pointer as a parameter. If I changed the struct to an int parameter, it worked fine (except being semantically stupid). I didn’t see anything wrong with my declaration of the struct, but on closer inspection, I had mis-capitalised one letter. Not the error message I’d expect for this problem, so it took longer than expected to find.
Hope this helps if you have the same problem…