View Single Post
Old 07-10-2012, 07:41 AM   #17
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,660
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by arooni View Post
Also can't get it to compile (yes I did install the latest libusb library before trying to compile. I also ensured that I added /usr/local/lib (where the libusb libraries were installed to, to my .bashrc file to set the path correctly).
Only problem with that, this is Linux, not Windows.
Nothing about the executable search path ($PATH) affects locating libraries either at build time or at run time.

At build time -
The tool chain looks in both "trusted" library locations: /lib and /usr/lib by default.
That search path and order may be changed by compiler options (which get passed on to the program linker) with the -L/path option(s).
Similar for locating the header files (which your program isn't finding), only then the option(s) is -I/path
Plus, the order of the options matter, because the linker is single pass. Unless the single pass behavior is altered with the start group/end group options.

Prefix_Index -> Tools_Index#Technical_References
And you will find a link to the gcc on-line manuals.
Go RTFM
knc1 is offline   Reply With Quote