I'm trying to get ld to see a path where I have a .so installed. There's another similar post here which I've been following.
In my case, I need the paths controlled by environment variable, just like the other person posting.
There's also another answer in a different post which recommends using pkg-config to auto-find the paths needed. But again, that won't work for me because it'd require changing source code, and the solution needs to be configuration-based (environment variable, ideally).
What I Tried
Setting LIBRARY_PATH
and/or LD_LIBRARY_PATH
to the directory doesn't work.
Using -L does work but I can't use it, because the solution must be configuration-based (no execution flags)
ld -lxcb-keysyms --verbose -L`echo $LD_LIBRARY_PATH` # This finds the path I need
LIBRARY_PATH=$LD_LIBRARY_PATH ld -lxcb-keysyms --verbose # This doesn't find it.
I've also tried modifying my path to include or not include the "lib64" folder in the environment variable like one of the answers pointed out. This doesn't work. Anyone know what I need to do to get this working?
System specs
$lsb_release --all
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core