<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 9/3/18 9:05 PM, Thomás Inskip wrote:<br>
<blockquote type="cite"
cite="mid:CALs+mqZ1fzAzW+z3w_5e+8wPy7QCkzBfZXK9zzugPM64H+Xv5A@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Does anyone know how I can specify that a specific
shared library (in this case an engine) is dependent on a
system-installed shared library (i.e. not built along with
openssl)?. Basically the equivalent of LDFLAGS += -lsomelib</div>
</blockquote>
The GNU runtime dynamic library will honor DT_NEEDED flags of
libraries, too. That is, you can just do LDFLAGS += -lsomelib on a
library target and it will work. Check libgtk-3.so, for instance:
<p>objdump -x /usr/lib/x86_64-linux-gnu/libgtk-3.so</p>
<p>will show a bunch of lines like...</p>
<p>Dynamic Section:<br>
NEEDED libgdk-3.so.0<br>
NEEDED libgmodule-2.0.so.0<br>
NEEDED libpangocairo-1.0.so.0<br>
NEEDED libX11.so.6<br>
NEEDED libXi.so.6<br>
NEEDED libXcomposite.so.1<br>
NEEDED libXdamage.so.1<br>
(...)</p>
<p>Meaning, all these libraries need to be loaded for libgtk-3.so to
work.<br>
</p>
<p>Beware gotchas:</p>
- Not all rtdl implementations do so, so if you're not using a GNU
platform (e.g., Linux), then check the documentation of your runtime
dynamic linker.<br>
- This works for shared libraries, but not for static ones.
<p>Regards,</p>
<p><br>
</p>
</body>
</html>