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

Re: Cannot find -lf2c compilation error



Paul Smith wrote:
Dear All,

I am trying to compile a program which was written in C. (The Makefile
is shown below.) However, when I run the command 'make', I get the
following error:

$ make
cc bpmain.o minput.o mpsinp.o convert.o mpsout.o mprnt.o timer.o
readpar.o bpmpd.o pddrv.o scale.o setlam.o symmfo.o mfillin.o
symfact.o symfact1.o refactm.o findpivs.o nfactsb3.o factsnb3.o
rngchk.o fbtran.o itrefsol.o supn6.o supn6_.o supnode.o supupdat.o
cstart.o cinf.o cstpcrt.o cstplen.o cnewpd.o cfixvar.o pdmodi.o
cdiag.o cdirpc.o cdircc.o preslv.o rowsng.o colsng.o rowact.o chepdu.o
duchek.o bndchk.o coldbl.o aggreg.o sparsr.o elimin.o pstslv.o -o
bpmpd -O -L./f2c -lf2c -lm

-L specifies a directory to search for library files (*.a)
-l is supposed to specify a specific library file.

Both are loader options (ld).
/usr/bin/ld: cannot find -lf2c

It looks like its looking for a library called "f2c" to link against and is complaining when it doesn't find one to search.

Is this a C program, or a FORTRAN program converted to C with f2c?

You probably need either the package compat-libf2c-34 or the package fc2 ....

collect2: ld returned 1 exit status
make: *** [bpmpd] Error 1
$

Any ideas?

Thanks in advance,

Paul

-------------------------------------------------------
CC              = cc
CFLAGS1         = -O -L./f2c -lf2c -lm
CFLAGS2         = -O -c $<
PROGRAM   = bpmpd
OBJS      = bpmain.o \
    minput.o \
    mpsinp.o \
    convert.o \
    mpsout.o \
    mprnt.o \
    timer.o \
    readpar.o \
    bpmpd.o \
    pddrv.o \
    scale.o \
    setlam.o \
    symmfo.o \
    mfillin.o \
    symfact.o \
    symfact1.o \
    refactm.o \
    findpivs.o \
    nfactsb3.o \
    factsnb3.o \
    rngchk.o \
    fbtran.o \
    itrefsol.o \
    supn6.o \
    supn6_.o \
    supnode.o \
    supupdat.o \
    cstart.o \
    cinf.o \
    cstpcrt.o \
    cstplen.o \
    cnewpd.o \
    cfixvar.o \
    pdmodi.o \
    cdiag.o \
    cdirpc.o \
    cdircc.o \
    preslv.o \
    rowsng.o \
    colsng.o \
    rowact.o \
    chepdu.o \
    duchek.o \
    bndchk.o \
    coldbl.o \
    aggreg.o \
    sparsr.o \
    elimin.o \
    pstslv.o

$(PROGRAM): $(OBJS)
	$(CC) $(OBJS) -o $(PROGRAM) $(CFLAGS1)
.c.o:
	$(CC) $(CFLAGS2)



--
Kevin J. Cummings
kjchome rcn com
cummings kjchome homeip net
cummings kjc386 framingham ma us
Registered Linux User #1232 (http://counter.li.org)


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