[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help linking a C program to .oct files
From: |
Jerry |
Subject: |
Help linking a C program to .oct files |
Date: |
Mon, 29 Dec 2014 20:41:20 -0700 |
I'm use OS X 10.9.4 and I'm trying to link a C program* to one of Octave's
"loadable functions," specifically the modified Bessel function of the second
kind which, using nm, appears to be on my machine at
/opt/local/lib/octave/3.6.4/oct/x86_64-apple-darwin13.3.0/besselj.oct
I'm not having any luck even though the octave documentation at
http://octave.sourceforge.net/coda/c58.html
says they are shared libraries.
I have successfully linked and bound to other Octave functions but of the
"built-in" type (at /opt/local/lib/octave/3.6.4/liboctave.dylib) so I feel that
linking to these loadable functions should be possible too.
At one point I got the complaint that
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file
'/opt/local/lib/octave/3.6.4/oct/x86_64-apple-darwin13.3.0//libbesselj.dylib'
for architecture x86_64
which somehow prompted me to try
$ otool -hv besselj.oct
besselj.oct:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 BUNDLE 21 2128 NOUNDEFS
DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK
At this point I'm in way over my head.
Does anyone have any idea what is in these .oct files and if it is possible to
link to them? I suppose I could try compiling from source into a more familiar
library....
Jerry
------------
*Not really C but Ada (gcc Ada aka GNAT) using C calling conventions.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Help linking a C program to .oct files,
Jerry <=