[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shared Libraries and Coda
From: |
Geraint Paul Bevan |
Subject: |
Re: Shared Libraries and Coda |
Date: |
Tue, 20 Jul 2004 22:01:07 +0100 |
User-agent: |
Mozilla Thunderbird 0.5 (X11/20040306) |
-----BEGIN PGP SIGNED MESSAGE-----
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
installed.
| I also have successfully installed octave-forge
octave-forge-2004.07.07. I
| am using RedHat Linux 9. After compiling I installed libshare.so.1.0.1
| and made appropriate links in /usr/local/lib.
|
| I tested the libshare.so 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 libshare.so) on the command
line when you use mkoctfile:
$ g++ -c share.c
$ ls
octshare.cc share.c share.h share.o
$ mkoctfile octshare.cc 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
http://homepage.ntlworld.com/geraint.bevan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iEYEARECAAYFAkD9iBIACgkQcXV3N50QmNNgoACfcsDaP5G+6bsqU92Dqd+elG+b
LzQAoIz2aRNjg5JYspudnjMPX7Ho6tJv
=534i
-----END PGP SIGNATURE-----
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------