How could I add a external library to the native c++ lirary path at Ubuntu to be found by #include from source code? I have some couple of sources that I try to include them by all the codes written on my machine thus instead of coping all the library every code I wrote, I plan to define it as a native c++ library that can be rached by all codes with single #include.
erogol
0
Newbie Poster
Recommended Answers
Jump to PostWhat mike_2k said, but understand that for an application to use the libraries you installed in /usr/local/lib, you will need to update the LD_LIBRARY_PATH environment variable to search there. IE, in your .bash_profile add this line:
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
The reason for the {} around LD_LIBRARY_PATH is …
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.