[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Finding .oct files in path
From: |
Kim Hansen |
Subject: |
Finding .oct files in path |
Date: |
Fri, 15 Oct 2010 15:54:11 +0200 |
Hi
(I have send this to address@hidden, but it seems that that list is
almost dead, that is why I resend it now to help-octave)
In octave 3.0 it was possible to make an .oct file and then find it in
the path, in 3.2 and 3.3 it does not work for me. I have created a
script that shows the differences between the three versions. It is
the last test in the script that I expected to work, but it only works
with 3.0.
Is this a bug or has something changed in octave that I am not aware of?
Regards,
Kim
Script and log of test runs below:
Script:
====================================
address@hidden:~/octave/test-function-on-octave-3.2$ cat test.sh
#!/bin/bash
echo 'Octave version'
which octave
octave -v | head -1
which mkoctfile
mkoctfile -v
echo
echo 'Setup hdir'
rm -rf hdir
mkdir hdir
cd hdir
cat <<END > hello_m.m
function hello_m()
printf("m - Hello world!\n");
endfunction
END
cat <<END > hello_oct.cc
#include <octave/oct.h>
DEFUN_DLD (hello_oct, , , "")
{
octave_stdout << "oct - Hello world!\n";
return octave_value_list ();
}
END
mkoctfile hello_oct.cc
echo
echo 'Test in hdir'
octave -q --eval 'hello_m'
octave -q --eval 'hello_oct'
echo
echo 'Test in parent dir'
cd ..
octave -q --eval 'addpath("hdir"); hello_m'
octave -q --eval 'addpath("hdir"); hello_oct'
echo
address@hidden:~/octave/test-function-on-octave-3.2$
====================================
Log:
====================================
address@hidden:~/octave/test-function-on-octave-3.2$
PATH="/home/kim/octave/install-release-3-0-x/bin:$PATH" ./test.sh
Octave version
/home/kim/octave/install-release-3-0-x/bin/octave
GNU Octave, version 3.0.5
/home/kim/octave/install-release-3-0-x/bin/mkoctfile
mkoctfile, version 3.0.5
Setup hdir
Test in hdir
m - Hello world!
oct - Hello world!
Test in parent dir
m - Hello world!
oct - Hello world!
address@hidden:~/octave/test-function-on-octave-3.2$
PATH="/home/kim/octave/install-release-3-2-x/bin:$PATH" ./test.sh
Octave version
/home/kim/octave/install-release-3-2-x/bin/octave
GNU Octave, version 3.2.4
/home/kim/octave/install-release-3-2-x/bin/mkoctfile
mkoctfile, version 3.2.4
Setup hdir
Test in hdir
m - Hello world!
oct - Hello world!
Test in parent dir
m - Hello world!
error: `hello_oct' undefined near line 0 column 18
address@hidden:~/octave/test-function-on-octave-3.2$
PATH="/home/kim/octave/install-trunk/bin:$PATH" ./test.sh
Octave version
/home/kim/octave/install-trunk/bin/octave
GNU Octave, version 3.3.52+
/home/kim/octave/install-trunk/bin/mkoctfile
mkoctfile, version 3.3.52+
Setup hdir
Test in hdir
m - Hello world!
oct - Hello world!
Test in parent dir
m - Hello world!
error: `hello_oct' undefined near line 0 column 18
address@hidden:~/octave/test-function-on-octave-3.2$
====================================
--
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Phone: +45 3091 2437
- Finding .oct files in path,
Kim Hansen <=