[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40824] newly compiled mex / oct function in p
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #40824] newly compiled mex / oct function in private subdirectory not detected |
Date: |
Fri, 5 Apr 2019 15:00:25 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 |
Follow-up Comment #5, bug #40824 (project octave):
I can't reproduce this bug anymore with Octave version 4.4 and 5. It may have
been fixed since it was originally reported.
To test this I created publicfun.m and privfun.cc
$ cat publicfun.m
function y = publicfun (x)
y = privfun (x);
endfunction
$ cat private/privfun.cc
#include <oct.h>
DEFUN_DLD(privfun, args, , "")
{
octave_value_list retval;
if (args.length () > 0)
{
double x = args(0).xdouble_value ("privfun: X must be a numeric
scalar");
double y = 3 * x;
retval(0) = y;
}
return retval;
}
I only built the oct file in the same Octave session that I tried to call it,
for example
octave:1> y = publicfun (2)
error: 'privfun' undefined near line 2 column 7
error: called from
publicfun at line 2 column 5
octave:1> mkoctfile -o private/privfun.oct private/privfun.cc
octave:2> y = publicfun (2)
y = 6
or
octave:1> cd private
octave:2> mkoctfile privfun.cc
octave:3> cd ..
octave:4> y = publicfun (2)
y = 6
@Julien Is this bug resolved for you now?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?40824>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40824] newly compiled mex / oct function in private subdirectory not detected,
Mike Miller <=