Advertisement
shottamo

Library_path

Nov 21st, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. LIBRARY_PATH is used by gcc before compilation to search for directories containing libraries that need to be linked to your program.
  2.  
  3. LD_LIBRARY_PATH is used by your program to search for directories containing the libraries after it has been successfully compiled and linked.
  4.  
  5. EDIT: As pointed below, your libraries can be static or shared. If it is static then the code is copied over into your program and you don't need to search for the library after your program is compiled and linked. If your library is shared then it needs to be dynamically linked to your program and that's when LD_LIBRARY_PATH comes into play.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement