How to use mkoctfile without installing octave

View: New views
3 Messages — Rating Filter:   Alert me  

How to use mkoctfile without installing octave

by jli127 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am a newbie to Octave. I have sucessfully compiled and run the octave-3.0.0 in Linux.
But since I don't have the permission to install software on the lab machine,
I get a lot of error messages when using mkoctfile. For example,

$ mkoctfile --link-stand-alone hello.cc -o hello
hello.cc:5:17: error: oct.h: No such file or directory

If adding the path, there will becomes lots more errors.
$ mkoctfile --link-stand-alone  -I/home/jli127/octave/octave-3.0.0/src hello.cc  -o hello

Is there a way I can run the mkoctfile without fully installing octave-3.0.0?
Can I install the octave into some other folders, then specifying the folders of include and library
when using mkoctfile?

Thanks,
JL

Re: How to use mkoctfile without installing octave

by dbateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


jli127 wrote:
Hi,

I am a newbie to Octave. I have sucessfully compiled and run the octave-3.0.0 in Linux.
But since I don't have the permission to install software on the lab machine,
I get a lot of error messages when using mkoctfile. For example,

$ mkoctfile --link-stand-alone hello.cc -o hello
hello.cc:5:17: error: oct.h: No such file or directory

If adding the path, there will becomes lots more errors.
$ mkoctfile --link-stand-alone  -I/home/jli127/octave/octave-3.0.0/src hello.cc  -o hello

Is there a way I can run the mkoctfile without fully installing octave-3.0.0?
Can I install the octave into some other folders, then specifying the folders of include and library
when using mkoctfile?

Thanks,
JL
cd ~/octave/octave-3.0.0
./configure --prefix=/home/jli127/octave-3.0.0
make
make install
export PATH=/home/jli127/octave-3.0.0:$PATH
cd path/to/hello.cc
mkoctfile --link-stand-alone hello.cc -o hello

D.

Re: How to use mkoctfile without installing octave

by jli127 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It works perfect now. Thank you for your help!

JL