help-octave
[Top][All Lists]
Advanced

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

Re: Running C++ program from octave ??


From: Robert A. Macy
Subject: Re: Running C++ program from octave ??
Date: Thu, 21 Jul 2005 15:43:43 -0700

Henry,  

I have three files named mkoctfile...

mkoctfile.lnk . . . . this is a shortcut on the WinXP
    or, mkoctfile.lin . . on the Win98
mkoctfile.link . . . . text file?
mkoctfile-2.1.50 . . . . this is a text file?
 appears to have all the compile statements in it

Using command line prompt (not octave, but DOS)
mkoctfile generates the standard error message
  Bad command or file name
no matter where typed.  
 GNU octave 2.1.50
   ../bin
   ../octave_files

Can't get passed that point.  

             - Robert -

On Thu, 21 Jul 2005 11:59:29 -0700
 "Henry F. Mollet" <address@hidden> wrote:
> Required to be able to run dynamically linked functions.
> 
> It is a two step process. First the .cc source file needs
> to be compiled
> using 'mkoctfile filename' at the shell prompt (not the
> octave prompt) so
> this requires mkoctfile. Second the Octave version has to
> be able to run the
> .oct file which requires octave_config_info ("dld") = 1,
> not 0.
> 
> After compilation one has the files filename.cc,
> filename.o, and the
> filename.oct. Using 'filename' at the octave prompt will
> use the
> filename.oct. 
> 
> Now assume you also have a corresponding filename.m. This
> one was running
> too slowly for you and you wanted to speed it up. You
> therefore created a
> .cc source using C or C++ language and then you compiled
> it. Now in addition
> to the .oct file you also have the .m file in the same
> directory. I believe
> octave will use the .oct file rather than the .m file if
> you type 'filename'
> at the octave prompt. One can test this by temporarily
> renaming on of the
> files, so that Octave can no longer find it when called
> with the old name.
> Henry
> N.B On my new Octave 2.1.71 installation I could not find
> the oregonator.cc
> nor orgegonator.m examples, so I grabbed the ones on my
> old computer and am
> now testing what I said in previous paragraph.
> [/usr/local/share/octave/examples] -bash-2.05b 518$ ls
> oregonator.cc   oregonator.m
> 
> [/usr/local/share/octave/examples] -bash-2.05b 522$ sudo
> mkoctfile
> oregonator.cc
> % sudo because all my directories are locked and I don't
> know how to obtain
> root privilages for all directories and files in one
> sweep.
> Cut
> 
> [/usr/local/share/octave/examples] -bash-2.05b 523$ ls
> oregonator.cc   oregonator.m    oregonator.o
>    oregonator.oct
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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