From: Jeff Denham <jdenham@allaire.com>
Subject: Re: CC flags needed for using dlopen()?
Date: 1999/06/15 [thread overview]
Message-ID: <376655AB.69E773A0@allaire.com> (raw)
In-Reply-To: 375EFB49.FCAB2B07@colorado.edu
Rob Derstadt wrote:
> Hello,
>
> I'd like to load a library at runtime using dlopen(...) and dlsym(...)
> on an alpha running OSF1. I'm using cc and am not sure what
> compiler/linker flags I need to use, does anyone know? Also, is there a
> way to tell if the library I'd like to open is indeed loadable at
> runtime? It's a 3rd part lib that I don't have source access to. Thanks
> in advance.
From a compilation standpoint, the only requirement that I know
of is that the program that wants to use dlopen() must
be linked shared itself, that is, with -call_shared not -static.
Because shared linking is the default, you don't need to do
anything.
As for the second part of your question, there's no real way
to tell if you can load a library successfully without trying.
Check the return status of your calls and be sure to code
a nice failure path ;^) Seriously, a quick little program will
tell you whether the library you have in mind will cooperate.
__________________________________________________
Jeff Denham (jdenham@allaire.com)
Allaire Corp: Resource-management software
for building and managing fast, reliable web sites
See us at http://www.allaire.com and http://www.brighttiger.com
125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax: (978) 263-5547
prev parent reply other threads:[~1999-06-15 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-09 4:00 CC flags needed for using dlopen()? Rob Derstadt
1999-06-15 4:00 ` Jeff Denham [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox