Hi krish_22,
I'm not sure about your opencv c code. For me,
$source $TOOLCHAIN_ROOT/environment-setup-i586-poky-linux
${CC} -g -I $TOOLCHAIN_ROOT/sysroots/i586-poky-linux/usr/include/libusb-1.0 -L $TOOLCHAIN_ROOT/sysroots/i586-poky-linux/lib -l usb-1.0 -o program program.c $LIB_DIR/mylib.a
Assuming your $TOOLCHAIN_ROOT is the root directory in which the cross-compiler toolchain was installed, and $LIB_DIR is the directory in which you created your static library mylib.a (if you don't have a static lib, then remove $LIB_DIR/mylib.a part). Also, the i586-poky-linux can be x86_64 depending on your cpu.
I hope this helps.
Thuy