How to link other .o, .so, .a files to current cuda compliation

I want to link libcudart.so to my cuda code such that reference to these functions should be available. when i fire readelf -Ws on .so file or .o file it shows multiple UND (Undefined) Entries. please help.

nvcc -c cuda/spmv/dispatch-float-float.cu -o cuda/spmv/dispatch-float-float.o -O2 -v -I. -gencode arch=compute_30,code=sm_30 -DCUDA_ARCH=30 --ptxas-options -v --cudafe-options --diag_suppress=code_is_unreachable --compiler-options -fPIC --compiler-options -fpermissive

this is my compilation code. which does not link CUDA functions from libcudart.so file and CUDA functions remain undefined.

cross posted:

[url]c++ - How to link other .o, .so, .a files to current cuda compliation - Stack Overflow