[Date Prev][Date Next]
Re: configure: warning: Could not locate TLS/SSL package.
[ Somsak RAKTHAI ]
> I do below.
> export CPPFLAGS="-I/usr/local/BerkeleyDB.4.1/include"
> export LDFLAGS="-L/usr/local/BerkeleyDB.4.1/lib"
> And then how to add "-I/usr/local/ssl/include"
> and "-L/usr/local/ssl/lib" without replace previous
> CPPFLAGS and LDFLAGS.
The linker doesn't always know of /usr/local/lib. It (almost) always
know of /usr/lib (LIBPATH).
The solution is to tell the linker and cpp to look for libs and headers
in other places as well.
Your example (with working flags):
export CPPFLAGS="-I/usr/local/BerkeleyDB.4.1/include \
export LDFLAGS="-L/usr/local/BerkeleyDB.4.1/lib \
The '-L' flag tell the linker to search for libraries in the following
path. The libs found here are chosen before those in the standard
directories. The '-R' flag tells the runtime linker where to search
for libraries when the program is run.
If you include '-L', but not '-R' you often get errors when running
the sotfware compiled. It compiles ok, but doesn't have a clue where
to look for libraries it was compiled against.
On Linux replace '-R<path>' with '-Wl,-rpath,<path>'.
"If it works; HIT IT AGAIN!"