help-octave
[Top][All Lists]
Advanced

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

octave 3.0.2 cann't find existed user def ined oct file


From: joyce
Subject: octave 3.0.2 cann't find existed user def ined oct file
Date: Tue, 7 Oct 2008 08:33:28 +0800 (CST)

hi all,
I'm using Octave-3.0.2_i686-pc-mingw32_gcc-4.3.0 under windows xp, but after
the example file myfunc.c compiled by mkoctfile and I typed myfunc in octave prompt
window, it shows message below:
> myfunc
error: `myfunc' undefined near line 4 column 1
octave-3.0.2.exe:4:D:\Octave\3.0.2_gcc-4.3.0\test

code of myfunc.c is as below:
#include "mex.h"

void
mexFunction (int nlhs, mxArray *plhs[], int nrhs,
const mxArray *prhs[])
{
const char *nm;
nm = mexFunctionName ();
mexPrintf ("You called function: %s\n", nm);
if (strcmp (nm, "myfunc") == 0)
mexPrintf ("This is the principal function\n", nm);
return;
}

I changed mkoctfile command as "mkoctfile --mex myfunc.c" and produced myfunc.mex,
however, the problem is still there.
Even I move myfunc.oct to folder "D:\Octave\3.0.2_gcc-4.3.0\libexec\octave\3.0.2! \oct\i686-pc-mingw32", it still can not recognize this oct file.
Anybody can help me, please?
Many thanks.

joyce

reply via email to

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