From help-octave-request at bevo dot che dot wisc dot edu Mon Dec 22 18:16:38 2003 Subject: Re: How to use octave-forge? From: Geraint Paul Bevan To: "Henry F. Mollet" CC: Octave_post Date: Tue, 23 Dec 2003 00:23:12 +0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Henry F. Mollet wrote: | Given oregonator.cc why would I create oregonator.oct? Why not compile with | gcc and then run a.out at the shell prompt instead of oregonator at the | Octave prompt? Thanks. | Henry | | The oregonator.cc file doesn't contain a "main" function so it will not run as a standalone executable. It is of course possible to write a short main() function to call it. To call the existing oregonator function, you should be aware that the DEFUN_DLD macro prepends F to the function name, hence oregonator expands to "Foregonator", and has a return type "octave_value_list". To compile using g++ directly, you would need to link to the Octave library (liboctave) and other libraries on which this depends (such as libkpathsea). Thankfully, it is no longer necessary to specify all the libraries manually, the "mkoctfile" script now contains a - --link-stand-alone option that takes care of the linking and include paths for you. - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iEYEARECAAYFAj/nivAACgkQcXV3N50QmNN3wgCdGbLhpDpgpjZDLhk+xlSMRNuR 9gcAn0sDjnJC7J5Hu4+lZCRjwJbCS+9i =ZIRg -----END PGP SIGNATURE----- ------------------------------------------------------------- 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 -------------------------------------------------------------