help-octave
[Top][All Lists]
Advanced

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

Re: OCT-files and (other) shared libraries


From: Mike Miller
Subject: Re: OCT-files and (other) shared libraries
Date: Mon, 17 Oct 2016 11:13:41 -0700
User-agent: NeoMutt/20160916 (1.7.0)

On Mon, Oct 17, 2016 at 17:37:42 +0200, Patrick Boettcher wrote:
> Hi list,
> 
> I'd like to call functions and methods from Octave which are located in
> shared library (or static at my option).
> 
> I therefore created a .cpp-file which includes the needed .h-files from
> my library and during the call to mkoctfile I'm supplying -I -l and -L
> arguments.
> 
> Running ldd on the resulting .oct-file shows me the runpath to my
> library is set correctly - the library is listed.
> 
> However, calling my method from within octave fails with:
> 
>   error: file.oct: failed to load: file.oct: undefined symbol: <symname>
> 
> (simplified for readability, <symname> is a function located in my
> library)
> 
> What do I need to do to have octave load the dependency?

With what you have given, it sounds like you are doing everything right.

If Octave had actually been unable to open the shared library, the error
would have been something like this

  error: file.oct: failed to load: libsomething.so: cannot open shared object 
file: No such file or directory

So it is more likely that the library was found and opened correctly,
but the symbol in question was not resolved in the library correctly.

What is the library and what is the symbol name?

-- 
mike



reply via email to

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