Problem with using libusbx library in Nsight?

Hi,

I’m trying to use libusbx library with nsight. I followed the following steps to do it:

  1. Downloaded libusbx tarball and installed in host ubuntu.
  2. As per instructions given at the end of libusbx installation

Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH’ environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf’

I added the following:

  • ‘LIBDIR’ and libusb.-1.0.so file path under Tool Settings>NVCC Linker>Libraries> Library search path(-L)
  • LD_LIBRARY_PATH and LD_RUN_PATH environment variables
  • libusb.h path under NVCC Compiler>Includes> Include paths(-l)
  • -lusb-1.0 under NVCC Linker>Miscellaneous>Other flag

When I build my project in Nsight, I get the following error in console.

make all
Building target: 2USB
Invoking: NVCC Linker
/usr/local/cuda-6.5/bin/nvcc --cudart static -L/usr/local/lib -LLIBDIR --relocatable-device-code=false -gencode arch=compute_20,code=compute_20 -gencode arch=compute_20,code=sm_20 --target-cpu-architecture ARM -m32 -ccbin arm-linux-gnueabihf-g+±4.6 -link -o “2USB” ./src/2USB.o -lusb-1.0
/usr/local/lib/libusb-1.0.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [2USB] Error 1

I could not find any general steps to configure a library in Eclipse/Nsight. Can anyone suggest me how to fix this?
Thanks.