[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macosx mex error: failed to install .mex file function `myhello'
From: |
John W. Eaton |
Subject: |
Re: macosx mex error: failed to install .mex file function `myhello' |
Date: |
Wed, 3 Jan 2007 11:48:47 -0500 |
On 3-Jan-2007, Thomas Treichl wrote:
| Aha, I see, never tried the "nm" command. This is my output:
|
| macmini:~/Developement/octave/examples Thomas$ nm myhello.o
| 0000006a S ___i686.get_pc_thunk.bx
| 00000000 T _mexFunction
| U _mxCreateDoubleMatrix
| U _mxGetPr
Please try the following patch.
Thanks,
jwe
src/ChangeLog:
2007-01-03 John W. Eaton <address@hidden>
* dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Also check
for _mexFunction.
Index: src/dynamic-ld.cc
===================================================================
RCS file: /cvs/octave/src/dynamic-ld.cc,v
retrieving revision 1.76
diff -u -u -r1.76 dynamic-ld.cc
--- src/dynamic-ld.cc 19 Oct 2006 01:27:35 -0000 1.76
+++ src/dynamic-ld.cc 3 Jan 2007 16:46:59 -0000
@@ -413,9 +413,17 @@
if (! function)
{
- function = mex_file.search (STRINGIFY (F77_FUNC (mexfunction,
MEXFUNCTION)));
- if (function)
- have_fmex = true;
+ // FIXME -- can we determine this C mangling scheme
+ // automatically at run time or configure time?
+
+ function = mex_file.search ("_mexFunction");
+
+ if (! function)
+ {
+ function = mex_file.search (STRINGIFY (F77_FUNC
(mexfunction, MEXFUNCTION)));
+ if (function)
+ have_fmex = true;
+ }
}
}
else