How do I determine the Ubuntu Linux Library Path? That is, how does the linker know where to got to grab the object files when linking my program?
Join Stack Overflow to learn, share knowledge, and build your career.
|
The file paths can be set explicitly when linking using the There are also some paths hard-coded into the linker, using the
|
||||
|
|
|
Look at |
|||
|
|
|
If it's not a standard path ( |
|||
|
|
|
When linking, you need to specify the -L flag to indicate where the library is located. At runtime, the dynamic linker uses the paths given in "/etc/ld.so.conf", "/etc/ld.so.conf.d/*" and the value of LD_LIBRARY_PATH. |
|||
|
|
|
"sudo ldconfig" updates the system's cache if you've just installed something new. |
|||
|
|