----- Original Message -----
From: "Sean McMahon" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Tuesday, June 19, 2007 10:14 AM
Subject: Still having trouble linking to a static library
.
.
There happens to be both a static version and dynamic version of this
library
Are you sure about that. If you build a dynamic version of the library
you'll probably get both '.a' and '.so' files. But, as I understand it, the
'.a' file does not represent a 'static build' of the library - it's just an
import library that you can link to that will enable access to the '.so'. To
get a static library, you may have to actually re-build the library as a
static library (in which case no '.so' file will be built). Have you done
that ?
I would probably first be testing using simple C test programs (that need to
utilise the library).
Try compiling such a test program against your "static" libmylib.a. Check
that the executable runs fine. Then hide the '.so' (eg, by renaming it).
Does the executable still run fine ? If not, then that would indicate to me
that 'libmylib.a' is merely an import lib for the '.so', and not a static
lib at all. (You have to be a little careful with that experiment - if you
hide one '.so' file, but the executable manages to find another instance of
it that you had forgotten about, then you haven't proved what you think you
have :-)
Other than that, if you can't get a satisfactory resolution here, Perlmonks
would be a good place to ask - as you'll reach a far wider audience there
than you will here. I don't think you'll need to join up - though you
certainly can if you want to. But I think you can simply go to
http://www.perlmonks.org/index.pl?node=Seekers%20of%20Perl%20Wisdom and ask
your question by filling out the form at the bottom of the page. Then you
can check for replies (and also make your own further replies in the same
thread) at http://www.perlmonks.org/index.pl?node=Newest%20Nodes .
Cheers,
Rob