M
MagmaGal
Hi all,
I have the following makefile:
---------------------------------------------------------------
..f.o: ; g77 -c -e -fno-underscoring $*.f
..c.o: ; gcc -c $*.c
BIN = ../.
LIBS = -L/lib -lm -lg2c
selfpfit: selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o rfuncs.o
cc -o selfpfit selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o
rfuncs.o $(LIBS)
---------------------------------------------------------------
When I type 'make selfpfit', I get the following:
------------------------------------------------
gcc -c selfpfit.c
gcc -c sumio.fpfit.c
g77 -c -e -fno-underscoring area.f
g77 -c -e -fno-underscoring sphere.f
g77 -c -e -fno-underscoring mconv.f
g77 -c -e -fno-underscoring rfuncs.f
cc -o selfpfit selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o
rfuncs.o -L/lib -lm -lg2c
selfpfit.o: In function `main':
selfpfit.o(.text+0x93e): undefined reference to `sphere'
selfpfit.o(.text+0x9c2): undefined reference to `area'
sumio.fpfit.o: In function `putsumUW':
sumio.fpfit.o(.text+0x63c): undefined reference to `mconv'
collect2: ld returned 1 exit status
make: *** [selfpfit] Error 1
------------------------------------------------
This seems to me like a linking problem, since area.o, sphere.o,
mconv.o are all created in the directory. The code was all written for
UNIX, and I am running RedHat Linux release 8.0 Kernel 2.4.18-14 on an
i686. Can anyone give me any advice on what's going wrong?
Thanks.
Diana
I have the following makefile:
---------------------------------------------------------------
..f.o: ; g77 -c -e -fno-underscoring $*.f
..c.o: ; gcc -c $*.c
BIN = ../.
LIBS = -L/lib -lm -lg2c
selfpfit: selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o rfuncs.o
cc -o selfpfit selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o
rfuncs.o $(LIBS)
---------------------------------------------------------------
When I type 'make selfpfit', I get the following:
------------------------------------------------
gcc -c selfpfit.c
gcc -c sumio.fpfit.c
g77 -c -e -fno-underscoring area.f
g77 -c -e -fno-underscoring sphere.f
g77 -c -e -fno-underscoring mconv.f
g77 -c -e -fno-underscoring rfuncs.f
cc -o selfpfit selfpfit.o sumio.fpfit.o area.o sphere.o mconv.o
rfuncs.o -L/lib -lm -lg2c
selfpfit.o: In function `main':
selfpfit.o(.text+0x93e): undefined reference to `sphere'
selfpfit.o(.text+0x9c2): undefined reference to `area'
sumio.fpfit.o: In function `putsumUW':
sumio.fpfit.o(.text+0x63c): undefined reference to `mconv'
collect2: ld returned 1 exit status
make: *** [selfpfit] Error 1
------------------------------------------------
This seems to me like a linking problem, since area.o, sphere.o,
mconv.o are all created in the directory. The code was all written for
UNIX, and I am running RedHat Linux release 8.0 Kernel 2.4.18-14 on an
i686. Can anyone give me any advice on what's going wrong?
Thanks.
Diana