help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically Linked Functions


From: John Eaton
Subject: Re: Dynamically Linked Functions
Date: Mon, 27 Mar 95 13:50:38 CST

address@hidden (Ted Harding) wrote:

: 1. Since Octave seems to use "ld.so" in Linux to load the "f2c" libraries,
:    is "ld.so" OK for this purpose in general?

It should eventually be possible to implement dynamic linking for
Octave using dlopen(), dlsym(), dlclose(), etc.  This doesn't work now
for a couple of reasons.  First, as of version 2.6.3, g++ doesn't
support the creation of shared libraries (there are some patches on
ftp.cygnus.com, but I haven't tried them).  I think this is supposed to
be fixed in 2.7.x.  Second, Octave would need a little more code to
actually link to the .so files at run time.

: 2. If "yes" to 1, suppose I wanted to make the given example function
:    "hello" executable from Octave.
:    a) How should this be compiled? What include files are required with
:       ld.so and is there anything else one should make sure of?

I'm not sure exactly how to make this work yet with anything but dld.

:    b) How does one make Octave aware of the existence of the new function?
:       (I assume it would be called by "hello(arg1, arg2, ... , argn)").

You would need to add some code in dynamic-ld.cc to use the dlopen()
and dlsym() functions to reference and resolve the undefined functions.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]