Date: Sat, 27 Jul 1996 00:45:41 -0400 (EDT) From: Tim Vanderhoek <hoek@freenet.hamilton.on.ca> To: Christian <PLAZAS_CHRISTIAN@mercury.csg.peachnet.edu> Cc: questions@FreeBSD.org Subject: Re: C GURUS: How to link three object files together ? Message-ID: <Pine.SOL.3.91.960727003339.11109A-100000@james.freenet.hamilton.on.ca> In-Reply-To: <8B5A8A3C84@mercury.csg.peachnet.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Jul 1996, Christian wrote:
> I am trying to build a small program that I got from somebody
> else. The program was created on solaris 2.4 and the makefile is a
> solaris 2.4 makefile. I typed make all and FreeBSD successfully
> compiled the .c files into .o files, but when it tries to link the
> files I get the following error message:
>
> -o appletgateway tcp_clt.o tcp_srv.o util.o
> -o: not found
> *** Error code 1
I'd say it's trying to execute a file called `-o', offhand.
> Here is what the makefile looks like:
> ------cut here-----------------------------------------------
> CFLAGS = -O
> LDFLAGS = -lsocket -lnsl
>
> PROGRAMS = appletgateway
>
> AG_OBJECTS = tcp_clt.o tcp_srv.o util.o
>
> .KEEP_STATE:
>
> all: ${PROGRAMS}
>
> appletgateway: ${AG_OBJECTS}
> ${LINK.c} -o $@ ${AG_OBJECTS} ${LDLIBS}
This should be
${CC} ${CCFLAGS} ${LDFLAGS} -o $@ ${AG_OBJECTS}
> clean:
> rm -rf .make.sate core ${PROGRAMS} ${AG_OBJECTS}
> --------cut here-----------------------------------------------
> I know very little about C and even less about make.
> Can somebody help me?
I'm not at all familiar with Solaris, but looking at the Makefile, I
suspect you're lucky it was a fairly simple one since it looks like
Solaris does a number of things differently. It obviously expects
${LDFLAGS} to somehow morph into ${LDLIBS}.
> Thanks In Advance,
No promises it'll work...
--
Outnumbered? Maybe. Outspoken? Never!
tIM...HOEk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.960727003339.11109A-100000>
