ld problem

Tilby, Lynn # PHX LTilby@simatics.com
Mon, 20 Nov 2000 12:43:17 -0700


The following makefile gives the output at the bottom... gcc obviously finds
the libs but, I think gcc is not feeding ld correctly.  I have tried
changing the order of the args to gcc -l and get the same result, only it
cannot find the different arg.  I have also tried simply using ld but I get
wierd unresolved externals not even from my code! 

#makefile  

SRCS = create_volitility_dat.c
OBJS = create_volitility_dat.o
EXEC = create_volitility_dat
LIB_DIR = /usr/lib
LIBS =  ${LIB_DIR}/libc.a \
	${LIB_DIR}/libm.a \
	${LIB_DIR}/libecpg.a \
	${LIB_DIR}/libpq.a

DEBUG = 3
OPTIMIZATION = 	-ffast-math \
		-ffloat-store \
		-fforce-mem 
		# -O2 -O3

#exec: ${EXEC}
#	ld -o ${EXEC} ${OBJS} ${LIBS} -lc

objs: ${EXEC}
	gcc -l${LIBS} -v -g${DEBUG} ${SRCS} -o${EXEC} 
----------------------------------------------------------------------------
-------------------------------
gcc -l/usr/lib/libc.a /usr/lib/libm.a /usr/lib/libecpg.a /usr/lib/libpq.a -v
-g3 create_volitility_dat.c -ocreate_volitility_dat
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
.
.
.
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/crtend.o /usr/lib/crtn.o
/usr/bin/ld: cannot find -l/usr/lib/libc.a
collect2: ld returned 1 exit status
make: *** [objs] Error 1






Lynn P. Tilby (Lead Programmer/Analyst)
National Data Corporation / Health Information Services
Data Warehousing Solutions
Office: 602 381-9629
Pager:  602 205-1692
Cell:	  480 510-4392
Home O: 480 632-8635
Home:	  480 632-8633
ltilby@simatics.com (work)
lynn@sol.createv.com (personal)