From help-octave-request at bevo dot che dot wisc dot edu Mon Dec 22 20:15:42 2003 Subject: Re: How to use octave-forge? From: "Henry F. Mollet" To: Geraint Paul Bevan CC: Octave_post Date: Mon, 22 Dec 2003 18:14:03 -0800 GNU Octave, version 2.1.46 (powerpc-apple-darwin6.8). Many thanks. Apparently my version of Octave does not support dynamic linking and I cannot even create an .oct file at the shell prompt. [Henry-Mollets-Computer:doc/octave/examples] mollet% mkoctfile oregonator.cc /var/tmp//ccT8XOce.s:unknown:FATAL:can't create output file: oregonator.o octave:1> octave_config_info ("dld") ans = 0 Why does my Dec 2003 Fink installation from source not provide for dynamic linking? What did I do wrong? What needs to be done to support dynamic linking? Henry on 12/22/03 4:23 PM, Geraint Paul Bevan at g dot bevan at mech dot gla dot ac dot uk wrote: > -----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 -------------------------------------------------------------