[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: linking fortran subs
From: |
Mumit Khan |
Subject: |
re: linking fortran subs |
Date: |
Fri, 25 May 2001 08:42:40 -0500 (CDT) |
On Fri, 25 May 2001, Phil Cummins wrote:
> error: /home/cummins/src/seis/ttimes/octtst.oct: undefined symbol: s_rsue:
> /home/cummins/src/seis/ttimes/octtst.oct `FSocttst__Fv'
> error: /home/cummins/src/seis/ttimes/octtst.oct: undefined symbol: s_rsue:
> /home/cummins/src/seis/ttimes/octtst.oct `_FSocttst__Fv'
fyi, ``FSocttst__Fv'' is the GNU C++ mangled name for ``FSocttst(void)''.
The symbol s_rsue is defined your Fortran runtime library, which mkoctfile
does not link in by default. Just add -lg2c if you're using gcc/g77 or the
appropriate Fortran runtime if you're using some other Fortran compiler
when building the .oct file.
If you don't know what the Fortran runtime libraries needed are for your
compiler/platform, look at the FLIBS member of the structure returned by
octave_config_info.
octave:1> foo = octave_config_info;
octave:2> a.FLIBS
ans = -lg2c -lm -L/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66
-L/usr/i386-redhat-linux/lib -lm
Regards,
Mumit
-------------------------------------------------------------
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
-------------------------------------------------------------