help-octave
[Top][All Lists]
Advanced

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

"Hello World" mex file: failed


From: Steve Thompson
Subject: "Hello World" mex file: failed
Date: Fri, 30 Mar 2007 12:35:06 -0700

Dear Group,

I've compiled the "Hello World" mex file from
http://www.mathworks.com/support/tech-notes/1600/1605.html#example1

Here's what I get:

 $ cat hello.c
 #include "mex.h"
 void mexFunction(int nlhs, mxArray *plhs[],
   int nrhs, const mxArray *prhs[]) {
 mexPrintf("Hello, world!\n");
 }

 $ mkoctfile-2.9.10 -o hello.oct --mex hello.c

 $ ls
   ...
 -rw-r--r-- 1 ... ...  137 2007-03-30 12:06 hello.c
 -rw-r--r-- 1 ... ... 3.1K 2007-03-30 12:14 hello.o
 -rwxr-xr-x 1 ... ... 7.0K 2007-03-30 12:14 hello.oct
   ...

 $ octave-2.9.10

 octave-2.9.10:1> hello
 error: `hello' undefined near line 1 column 1
 octave-2.9.10:1> addpath ('./')
 octave-2.9.10:2> hello
 error: `hello' undefined near line 2 column 1

Why could this be?

Thanks.

Steve


reply via email to

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