help-octave
[Top][All Lists]
Advanced

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

Re: More on API for Octave


From: ldoolitt
Subject: Re: More on API for Octave
Date: Mon, 27 Apr 1998 11:57:15 -0400 (EDT)

OK.  This is what I have so far - it's ugly, but basically working.

Machine 1: octave-2.0.5 binaries from RedHat 4.2 installed
Makefile as follows:

--cut here--
OCT_BASE=/usr/include/octave
OCTAVE_INCLUDES=-I${OCT_BASE}
CC=gcc
CFLAGS=-Wall -O
CXX=g++
CXXFLAGS=-Wall -O ${OCTAVE_INCLUDES}
OCTAVE_LIBS=-loctinterp -loctave -ltinst -lcruft -lOctaveReadline -lkpathsea
FLIBS=-lf2c -lgcc
TERMLIBS=-lncurses
CXXLIBS=-lg++ -ldl
OBJFILES = data.o ols.o rank.o analyze.o
testme: data.o ${OBJFILES}
        ${CXX} -o testme ${OBJFILES} ${OCTAVE_LIBS} ${FLIBS} ${TERMLIBS} 
${CXXLIBS}
--cut here--

Results in
% ls -l testme
-rwxrwxr-x   1 ldoolitt ldoolitt    41410 Apr 27 11:49 testme
% ldd testme
        liboctinterp.so => /usr/lib/liboctinterp.so
        liboctave.so => /usr/lib/liboctave.so
        libtinst.so => /usr/lib/libtinst.so
        libcruft.so => /usr/lib/libcruft.so
        libOctaveReadline.so => /usr/lib/libOctaveReadline.so
        libkpathsea.so => /usr/lib/libkpathsea.so
        libf2c.so.0 => /usr/lib/libf2c.so.0.20
        libncurses.so.3.0 => /usr/lib/libncurses.so.3.0
        libg++.so.27 => /usr/lib/libg++.so.27.1.4
        libdl.so.1 => /lib/libdl.so.1.7.14
        libstdc++.so.27 => /usr/lib/libstdc++.so.27.1.4
        libm.so.5 => /lib/libm.so.5.0.6
        libc.so.5 => /lib/libc.so.5.3.12

Machine 2: octave-2.0.11 unpacked and built on a Red Hat 4.2 Linux system,
but not installed (I'm not root).  Makefile as follows: 

--cut here--
OCT_BASE=${HOME}/octave/octave-2.0.11
OCTAVE_INCLUDES=-I${OCT_BASE} -I${OCT_BASE}/src -I${OCT_BASE}/liboctave 
-I${OCT_BASE}/libcruft/misc
CC=gcc
CFLAGS=-Wall -O
CXX=g++
CXXFLAGS=-Wall -O ${OCTAVE_INCLUDES}
OCTAVE_LIBS=-L ${OCT_BASE}/liboctave -loctave -L ${OCT_BASE}/libcruft -lcruft
FLIBS=-lf2c -lgcc -loctave
CXXLIBS=-lg++
OBJFILES = data.o ols.o rank.o analyze.o
testme: data.o ${OBJFILES}
        ${CXX} -o testme ${OBJFILES} ${OCTAVE_LIBS} ${FLIBS} ${CXXLIBS}
--cut here--

Results in
% ls -l testme
-rwxrwxr-x   1 ldoolitt ldoolitt   1001545 Apr 27 11:49 testme
% ldd testme
        libf2c.so.0 => /usr/lib/libf2c.so.0.20
        libg++.so.27 => /usr/lib/libg++.so.27.1.4
        libstdc++.so.27 => /usr/lib/libstdc++.so.27.1.4
        libm.so.5 => /lib/libm.so.5.0.6
        libc.so.5 => /lib/libc.so.5.3.12

The typical includes for my c++ files are
#include <config.h>
#include <oct-obj.h>
#include <utils.h>
#include <iostream.h>

I guess I must be doing something right, because they both get the right
answer :-)

Here's my to-do list:
   Repeat some of this on HP-UX
   Make a shared library with just the math parts of liboctave
   Tons of non-octave related stuff :-(


      - Larry Doolittle    <address@hidden>



reply via email to

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