Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: time@ice.com (Tim Endres)
Subject: HOW? Dynamically load subroutine at runtime.
Date: 1995/04/04	[thread overview]
Message-ID: <999999.qeo8kr@tbomb.ice.com> (raw)

I have an application with a common shell that wants to "plug in"
a subroutine to perform the computation. In other words, I wish
to produce a program that is missing one subroutine and then use
dlopen() to load the subroutine that I wish to use at runtime.

What I am very confused about is how to link the subroutine
to be loaded, and more importantly, the program that will load it.
I can not seem to get past the "unresolved external", and it
seems that anytime that I do I dump core as soon as I enter the
program and try to call fprintf().

Could someone please explain how to link the two files so that
I may use dlopen() to load and resolve a subroutine call at runtime?
Assume that the subroutine is in a file called "sub.c" and is
named "dyna_sub()", and assume that program is in a file named
"prgm.c", and its main() makes a call to "dyna_sub()".

thank you



                 reply	other threads:[~1995-04-04  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
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