bug? runtime error passing POD
Daniel Franke
daniel.franke@imbs.uni-luebeck.de
Mon Jul 4 18:58:00 GMT 2005
On Monday 04 July 2005 20:39, FX Coudert wrote:
> > Question: Bug in gfortran or misunderstanding on my side?
> Bug in gfortran, your code is good.
Thanks, that's an relief =)
> After a few trials, I guess you used static linking. There seems to be a
> bad interaction between using a C main program and statically linking
> libgfortran/libgfortranbegin.
No (explicit) static linking on my side:
-- Makefile--
GCCPATH = <local-path>
CFLAGS = -g -ansi -pedantic -W -Wall
FFLAGS = -g -W -Wall
LDFLAGS = -L$(GCCPATH)/lib -lgfortran -lm
test.gfortran: clean f.f90 test.c
$(GCCPATH)/bin/gfortran $(FFLAGS) -c f.f90 -o f.o
$(GCCPATH)/bin/gcc $(CFLAGS) -c test.c -o test.o
$(GCCPATH)/bin/gcc f.o test.o $(LDFLAGS) -o test.gfortran
--
$> ldd test.gfortran
libm.so.6 => /lib/libm.so.6 (0x40028000)
libc.so.6 => /lib/libc.so.6 (0x4004b000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Regards
Daniel
More information about the Fortran
mailing list