【发布时间】:2019-09-30 14:17:55
【问题描述】:
我想做如下的makefile,但我收到了这个错误:
gcc frparse.o frtags.o frscan.o frinit.o frstop.o frfoot.o frio.o -L/usr/local/image/lib/sgi -lioutil -lutil -o frparse
/usr/bin/ld: 找不到 -lioutil
collect2:错误:ld 返回 1 个退出状态 Makefile:17:目标“frparse”的配方失败 make: *** [frparse] 错误 1
如果您能指导我,我将不胜感激。
IMLIB = /usr/local/image/lib/sgi
LLIBS = -lioutil -lutil
it: frparse frcheck pgrep
OBJ = frparse.o frtags.o frscan.o frinit.o frstop.o frfoot.o frio.o
frparse.o: Makefile frparse.h frio.h frproto.h frstop.h frparse.c
frinit.o: Makefile frparse.h frproto.h frinit.c
frscan.o: Makefile frio.h frstop.h frscan.c
frfoot.o: Makefile frparse.h frproto.h frstop.h frfoot.c
frtags.o: Makefile frparse.h frio.h frproto.h frstop.h frtags.c
frstop.o: Makefile frstop.h frstop.c
frio.o: Makefile frio.c
frparse: $(OBJ)
gcc $(OBJ) -L$(IMLIB) $(LLIBS) -o $@
frcheck: frcheck.o
gcc frcheck.o -L$(IMLIB) $(LLIBS) -o $@
pgrep: pgrep.o
gcc pgrep.o -L$(IMLIB) $(LLIBS) -o $@
.c.o:
# cc -c -O2 -mips2 $<
gcc -c -g $<
【问题讨论】:
-
你在某处有图书馆
libioutil.a吗?在哪里?请edit您的问题添加此信息。 -
似乎
libioutil.a(或.so,或...)在加载程序可以找到的地方不存在。检查图书馆在哪里;忍受装载机正在寻找正确的地方。