help-octave
[Top][All Lists]
Advanced

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

.oct-file fails to load external shared c++ library (alglib)


From: franz2
Subject: .oct-file fails to load external shared c++ library (alglib)
Date: Thu, 28 Feb 2013 14:12:35 -0800 (PST)

Hi everyone,

I need a little help getting my Octave-code using the C++ API to run. I
created an .oct-file that is dynamicaly linked to the external, non-octave
'interpolation'-library from 'ALGLIB' v.3.7.0 (C++) 
http://www.alglib.net/download.php <http://www.alglib.net/download.php>  . 
This library I compiled from source using:

        gcc -c -O2 -fPIC interpolation.cpp -o interpolation.o
        gcc -shared -Wl,-soname,libinterpolation.so.1 -o libinterpolation.so.1
interpolation.o

... no errors.
Then I placed the 'libinterpolation.so.1' (and others and symlinked *.so )
into my system's lib-search-path (by adding the file
'/etc/ld.so.conf.d/alglib.conf' containing a line with '/usr/lib/alglib '
and then invoking 'ldconfig').

My .oct-file I compiled like this:

        mkoctfile -linterpolation bp_yTilt_interpolate.cpp
        
... and finished without errors again and when calling 'ldd ....oct' all
linked libraries are found.

Now when calling my function from within Octave I get this message:
        error: ....: /.../bp_yTilt_interpolate.oct: failed to load:
/usr/lib/alglib/libinterpolation.so.1: undefined symbol:
_ZN11alglib_impl20matrixmatrixmultiplyEPNS_9ae_matrixEllllbS1_llllbdS1_lllldPNS_9ae_vectorEPNS_8ae_stateE

... yet when I run 'nm /usr/lib/alglib/libinterpolation.so.1' the symbol is
found as ...

(...)
                 U
_ZN11alglib_impl20matrixmatrixmultiplyEPNS_9ae_matrixEllllbS1_llllbdS1_lllldPNS_9ae_vectorEPNS_8ae_stateE
(...)

... indicating it as a global debugging-symbol (upper-case N)

Did I forget to include something? Might this be a problem with alglib? Can
anyone point me in the right direction since I have no clue how to fix this?
Sorry if this is possibly a non-octave related problem.

I am using Linux Mint and compiled Octave 3.6.3 from source. Other
.oct-files I wrote that do not use external libraries all work fine.
Hope someone can help. Thank you very much in advance.

-Jonathan




--
View this message in context: 
http://octave.1599824.n4.nabble.com/oct-file-fails-to-load-external-shared-c-library-alglib-tp4650404.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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