Reputation: 1
I'm learning the cuda programming when compiling the example code from <>
nvcc -o hello hello.cu
it returns
/usr/bin/ld: cannot find -lcudadevt
/usr/bin/ld: cannot find -lcudart_static
but my cuda config appears well,
my LD_LIBRARY_PATH
and PATH
already include the right path of cuda.
How to do it?
Upvotes: 0
Views: 743
Reputation: 162297
LD_LIBRARY_PATH and PATH are runtime variables. At link time you must specify the location of the shared object using the linker's -L
flag.
Upvotes: 1