Well, I have a really troubling CUDA 5.0 question about how to put things together correctly. I would really appreciate any help!
Using the shared compilation functions of CUDA 5.0, I created a static library (* .a). This is well connected with other * .cu files when running through nvcc, I have done this many times.
Now I would like to take the * .cpp file and link it to the host code in this static library using g ++ or something else but not nvcc. If I try to do this, I get compiler errors like
undefined link to __cudaRegisterLinkedBinary
I use both -lcuda and -lcudart , and as far as I know, the libraries are in the correct order (which means -lmylib -lcuda -lcudart ). I do not think this is a problem. Maybe I'm wrong, but I feel that I am missing a step and that I need to do something else in my static library (device binding?) Before I can use it with g ++.
Did I miss something important? Is it possible?
Bonus question: I want the end result to be a dynamic library. How can I achieve this?
source share