[Top][All Lists]

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

Re: Shared Libraries and Coda

From: michaeld . jones
Subject: Re: Shared Libraries and Coda
Date: Tue, 20 Jul 2004 17:34:06 -0400

So I don't necessarily need to link dynamically but it ends up that your example prompted me to use g++ instead of gcc and everything is fine now. Do you have any opinion on when to use dynamically linked versus statically linked libraries?

Geraint Paul Bevan <address@hidden>

07/20/2004 05:01 PM

        To:        MichaelD Jones/PH/address@hidden
        cc:        address@hidden
        Subject:        Re: Shared Libraries and Coda

Hash: SHA1

address@hidden wrote:
| I have a simple test case I am using to see how I can get custom shared
| libraries called from a user oct-file. I have GNU Octave, version 2.1.57
| (i686-pc-linux-gnu). I used  configure --enable-shared before I
| I also have successfully installed octave-forge
octave-forge-2004.07.07. I
| am using RedHat Linux 9. After compiling I installed
| and made appropriate links in /usr/local/lib.
| I tested the library with a stand-alone app and it worked
| fine. When I run the octshare command in the directory containing the
| octshare.oct file in octave I get the following output.
| octave:1> octshare
| Test: Called internal method OK!
| octave: relocation error: /home/jonesmic/swack/test/coda2/octshare.oct:
| undefined symbol: _Z13getSomeNumberv
| Any body know what I might be missing?

I suppose the first question is, do you actually need to link against
the library at run time or would a static link suffice? If you only need
static linking, you can include share.o (or on the command
line when you use mkoctfile:

$ g++ -c share.c
$ ls  share.c  share.h  share.o
$ mkoctfile share.o
$ octave -q
octave:1> octshare
Test: Called internal method OK!
Test: Called libshare method OK!
ans =
~  [1] = 1000
~  [2] = 199.99

- --
Geraint Bevan

Version: GnuPG v1.2.4 (GNU/Linux)


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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