build optix with my makefile

Hi,

I want to build projects with Optix.
For example, if I compile SDK sample1 without the original cmake,

nvcc -arch=sm_20 -ptx -m64 draw_color.cu -o draw_color.ptx -I{DIR_OPTIX}/include
nvcc -arch=sm_20 -c sample3.c -o sample3.o -I. -I{DIR_OPTIX}/include
nvcc -arch=sm_20 -c sutil.c -o sutil.o -I. -I{DIR_OPTIX}/include
nvcc -arch=sm_20 sutil.o sample3.o -o sample3 -L{DIR_OPTIX}/lib64 -L/usr/local/cuda-6.0/lib64/ -lcudart -loptix
$ ./sample3
./sample3: error while loading shared libraries: liboptix.so.1: cannot open shared object file: No such file or directory

What can I do?

on linux? Make sure your LD_LIBRARY_PATH environment variable contains the directory where liboptix.so.1 lives, probably ${DIR_OPTIX}/lib64

on linux? Make sure your LD_LIBRARY_PATH environment variable contains the directory where liboptix.so.1 lives, probably ${DIR_OPTIX}/lib64

Thanks a lot! It works now.
By the way, I used CUDPP but forgot to change LD_LIBRARY_PATH. But that didn’t bring any error?

Edit: just found CUDPP uses .a