CUDA nvcc building chain of libraries
问题 My goal is: library2.so is using library1.so and mycode.o is using (libs should be linked) library2.so (and maybe library1.so ). The source code is (one line header files are omitted): library1.cu: __device__ void func1_lib1(void){} library2.cu: #include "library1.h" __global__ void func1_lib2(void) { func1_lib1(); } extern "C" void func2_lib2(void) { func1_lib2<<<1,1>>>(); } mycode.c: #include "library2.h" int main(void) { func2_lib2(); } I'm building the shared libraries according to with