Hans,
(Oleg, others correct me if I'm wrong)
I think -lpcap tells it to dynamically link to the libpcap.so lib, so the code is not
included in the output executable.
Then at runtime the system searches the library search path for the .so (set by an env
var, can't recall precise name) and loads the code from there.
This is called dynamic linking.
Linking with an .a file links the code into the output executable and produces a so called
statically linked binary.
That's what I recall, anyhow - I mostly mess around with Python nowadays :)
Sampsa
On 10 Apr 2012, at 21:12, H Vlems wrote:
Oleg,
thank you very much indeed: simh now correctly builds the vax, vax780 and
pdp11 executables. Others too, but these matter most for me.
Is it possible to explain what the magic does?
More precisely: what is the difference between an .a and an .so library?
How on earth does -lpcap point to /usr/lib?
If the answers are too lengthy or are too complex for an old Algol
programmer then say so ;-)
Hans
-----Oorspronkelijk bericht-----
Van: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] Namens
Oleg Safiullin
Verzonden: maandag, april 2012 8:04
Aan: hecnet at Update.UU.SE
Onderwerp: Re: [HECnet] building simh
On 04/09/2012 12:33 PM, hvlems at zonnet.nl wrote:
Dave,
I figured that out too. My system doesn't have a libpcap.a file! If I know
how to build one then all would be fine.
To build SimH manually wothout libpcap.a (but with libpcap.so.*) you should
edit `makefile' and replace line
NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include
/usr/local/lib/libpcap.a
with
NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include -lpcap
and then do
mkdir BIN
make USE_NETWORK=yes
Show replies by date