I have an application compiled using cudas nvcc compiler. It exports one function which is called by the c++ part of the app compiled by visual studio. The function takes one parameter which is a pointer to an interface class. Sadly when I access its contents within the host side of the cuda code I get a memory error. Now if I define the implementation inside the *.cu file instead of only inlcuing the *.h file with the declaration all is fine. Is there any way to prevent having to define implementations on both the nvcc side as well as vvisual studio side?