Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* CC flags needed for using dlopen()?
@ 1999-06-09  4:00 Rob Derstadt
  1999-06-15  4:00 ` Jeff Denham
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Derstadt @ 1999-06-09  4:00 UTC (permalink / raw)


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.

-Rob Derstadt




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CC flags needed for using dlopen()?
  1999-06-09  4:00 CC flags needed for using dlopen()? Rob Derstadt
@ 1999-06-15  4:00 ` Jeff Denham
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Denham @ 1999-06-15  4:00 UTC (permalink / raw)


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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-15  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-09  4:00 CC flags needed for using dlopen()? Rob Derstadt
1999-06-15  4:00 ` Jeff Denham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox