Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
CNotes
Edit
PageHistory
Diff
Info
LikePages
InNeedOfRefactor !Where can I set paths to the directories my shared libraries are stored in? The list of directories to be searched is stored in the file ''/etc/ld.so.conf''. Simply append your desired directory to this file. *echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf Now run ''ldconfig -v'' __Note:__ Don't do this for [Gentoo]. That already has <tt>/usr/local/lib</tt> included, and in any case <tt>/etc/ld.so.conf</tt> is automatically generated from the files in <tt>/etc/env.d</tt>, so any customizations you want must be made in the latter. Note : [ldconfig(8)] must be run whenever a DLL is added, when a DLL is removed, or when the set of DLL directories changes !Which libraries is my system aware of? *ldconfig -Nv !!Environment Variables !LD_LIBRARY_PATH A colon-separated set of directories where libraries should be searched for first, before the standard set of directories. *export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/new/dir/to/add" !LDLIBS Contains a list of external libraries to link with. For example to link with the libtrace library and the math library: *export LDLIBS="-ltrace -lm" !How to define macros inside the gcc command. gcc -D<macro_name>=<definition> Note : The ''=<definition>'' part is optional. For example: *gcc -DEVENT_DEBUG=1 ---- See also SharedLibraryNotes
No page links to
CNotes
.