[Top][All Lists]

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

Re: compiling a stand alone ...

From: Andy Adler
Subject: Re: compiling a stand alone ...
Date: Mon, 16 Oct 2000 22:46:09 -0400 (EDT)

On Sun, 15 Oct 2000, John W. Eaton wrote:
> On 15-Oct-2000, Andy Adler <address@hidden> wrote:
> | This gives me less errors (16 instead of 61),
> | but I still can't compile. There must be another lib
> | that I need.
> On some systems, if you have shared versions of liboctave and
> libcruft, you will need several libraries even if you never call the
> functions in them. Typically this includes libreadline, libkpathsea,
> and a termcap or curses library.  If you are using static libraries,
> this is usually not a problem.


Using this advice and the great 'searchlib' utility
from Paul Kienzle, I was able to get this to work
under RH6.2.  The basic trick was not to link with
the libkpathsea or libreadline supplied with the
distribution, but to link with the one that comes
with octave.

So, the working version is:

cat >>
#include <octave/oct.h>
main(){ ColumnVector dx (3); }

cc -c -I/usr/local/include/octave-2.1.31/octave/
cc stand.o -L/usr/local/lib/octave-2.1.31 -loctave -loctinterp ŠÜ
   -ldl -lcruft -lstdc++ -lg2c -ltermcap ŠÜ
   -L/usr/src/octave-2.1.31/kpathsea -lkpathsea ŠÜ
   -L/usr/src/octave-2.1.31/readline -lreadline

export LD_LIBRARY_PATH=/usr/local/lib/octave-2.1.31
strip ./a.out 
ls -l ./a.out 
-rwxrwxr-x    1 andy     andy       172896 Oct 16 22:44 ./a.out

Meanwhile, enquiring minds want to know: Is
octave putting extra functionality into kpathsea
and readline, or is Redhat leaving functionality

Thanks for all the help.
Andy Adler,                address@hidden

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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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