Mail Archives: djgpp/1994/09/09/05:04:08
Quoting Ron Grunwald,
>
> On Wed, 7 Sep 1994, Christian Burger wrote:
>
> > What is the current state of dynamic linking in djgpp?
> >
> > I have a larger application working on a (possibly complicated)
> > user-specified math function and I would rather compile and dynamically
> > link it at run-time than parse and interpret it.
>
> I'm not quite sure what sort of dynamic linking you are wanting to use
> here. Is it object-oriented dynamic binding or the Windows DLL dynamic
> binding ?
>
> Also, I'm not quite sure about what you want to link dynamically and
> when. Perhaps you would like to explain your objectives in more detail?
Suppose, there is plotting/fitting/raytracing/whatever program having a
certain number of builtin functions and also being able to handle math
expressions by interpreting parsed input (which is slow).
Now I want to extend this package for a new function. I could (1) write
it in the package's native to-be-interpreted code (slow if the function
is complicated) or (2) I could extend the sources to include a compiled
form of my new function which would be linked statically to the package
(fast, but inconvenient) or (3) I could code the function in C, compile
it to an .o file, and dynamically link this at run-time without
touching the original package (fast and very convenient).
I had a look at ftp.cygnus.com:pub/dj/dll-* and it does exactly what I
am looking for. (Somehow mkdll did not work as expected but an awk one-liner
for the same purpose worked well.) Apart from this, it runs without
problems. I think such a useful extension should quickly make it into
the main distribution.
Christian
-=-----
Christian Burger, Dept.of Phys.Chemistry, University of Marburg, Germany
e-mail: burger AT mailer DOT uni-marburg DOT de, (Phone|FAX): +49-6421-28-57(89|78)
- Raw text -