octave-maintainers
[Top][All Lists]
Advanced

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

Creating a standalone executable


From: John W. Eaton
Subject: Creating a standalone executable
Date: Wed, 18 Dec 2002 12:09:55 -0600

On 13-Dec-2002, JD Cole <address@hidden> 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 <octave/oct.h>
| 
| #include <iostream>
| 
| 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



reply via email to

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