Compiling with USB capability


We are attempting to write an application that uses the USB library.
However, there seems to be some complex dependencies regarding this
library. We have a small driver program compiling and working within
the /cvs/qnx4/drivers/devu/class directory (using the same setup that
mouse and prn drivers use); however, we would like to write a standalone
program (i.e. from /home/user directory) that can communicate with the
USB using the same function calls that the drivers use. The problem
comes in when we try to compile. Apparently, the way the include files
have been setup, it seems kind of complicated to get the necessary files
to link correctly. Could someone send a sample program that can be run
directly from the /home/user directory that compiles and links with all
of the necessary USB libraries. Thank you for all the help.