On Thu, Feb 3, 2011 at 1:39 PM, Mark Knecht <markkne...@gmail.com> wrote:
> What do I link to?
>
> I've tried various things like this but none seem to find the library 
> correctly:
>
> mark@c2stable ~/CODE/CUDA/Mark $ nvcc -L/usr/lib64/libta_lib
> ta-lib-ma.cu -o ta-lib-ma
> /tmp/tmpxft_00000a8b_00000000-13_ta-lib-ma.o: In function `main':
> tmpxft_00000a8b_00000000-1_ta-lib-ma.cudafe1.cpp:(.text+0x9f):
> undefined reference to `TA_SMA'
> collect2: ld returned 1 exit status

I haven't used nvcc, but I assume it works like gcc. If so, you'll
want to use the -L option for the library path and the -l option to
specify the library name. For example:

nvcc ta-lib-ma.cu -o ta-lib-ma -L/usr/lib64 -lta_lib

Reply via email to