Sounds like I can not define a member function of a class in cu file. Although the compiling is OK, when I link, there is error message showing that the defined symbol can not be found. I’m sure the object file from the cu files are linked when linking.
Am I right that in cu file, one can not define class member function? Or I missed anything?
I assume you are talking about host code, right? This has to be C-style linkage. C++ class member functions will have C++ name mangling. So the name will be augmented by these magic prefix characters and therefore is different from the C name. Try global static functions that forward to the class member.