From octave-maintainers-request at bevo dot che dot wisc dot edu Wed Dec 18 12:10:59 2002 Subject: Creating a standalone executable From: "John W. Eaton" To: JD Cole Cc: octave-maintainers at bevo dot che dot wisc dot edu, Paul Kienzle Date: Wed, 18 Dec 2002 12:09:55 -0600 On 13-Dec-2002, JD Cole wrote: | I am trying to write a standalone application using the Octave API and | am running into some trouble when I actually run the application. Here's | what I did: | | source code (a.cc) | ========= | #include | | #include | | using namespace std; | | int main(int argc, char *argv[]) | { | octave_value a(10.0),b(20.0),c; | | c = a + b; | | c.print(cout); | | return (0); | } | | how I compiled it | ============= | Initially I tried using the "--link-stand-alone" argument to mkoctfile, | but it seemed to be missing the library arguments "-lkpathsea | -loctinterp" or else I get missing symbols related to these two libraries. I've modified mkoctfile so that it will include these libraries when linking stand alone executables. But there is another problem in that the kpathsearch library is not installed when Octave is installed. Eventually, I'd like to remove kpathsearch from the Octave sources, but we can't do that quite yet. Some changes were needed to make kpathsearch work with Octave, and I'm not sure those changes are in any released version of kpathsearch yet, though I believe the changes have been accepted by the kpathsearch maintainer. I'm not sure whether it is a good idea to just install the libkpathsea.a from Octave's sources, since that may wipe out some other version of the library that is installed, depending on how libdir is set when building Octave. So maybe we should rename Octave's libkpathsea.a to be liboctkpathsea.a and install that instead? Other suggestions? jwe