Makefile 链接对象时,生成报告:组在开始之前结束?
我需要将我的对象链接到其他人的库文件。 因此,在我的makefile中,我这样写:Makefile 链接对象时,生成报告:组在开始之前结束?,makefile,Makefile,我需要将我的对象链接到其他人的库文件。 因此,在我的makefile中,我这样写: LIBSB =-Wl,--start-group -ldiag -ldiag_esw -lacl -ldiagcint -lcint -lsal_appl \ -lbcm_compat -lbcm_rpc -lcpudb -ltrx -lstktask -llubde -ldrivers -ldiscover \ -lrcu -lpthread -lrt -lm -Wl,--end-group LIB
LIBSB =-Wl,--start-group -ldiag -ldiag_esw -lacl -ldiagcint -lcint -lsal_appl \
-lbcm_compat -lbcm_rpc -lcpudb -ltrx -lstktask -llubde -ldrivers -ldiscover \
-lrcu -lpthread -lrt -lm -Wl,--end-group
LIB := -L../lib/$(LIBSB) # ../lib is the path of folder
APP_NAME = L3appl
$(APP_NAME): $(OBJS)
$(CC) -c $(INC_DIR) $(SRCS)
$(CC) -o $(APP_NAME) $(OBJS) $(LIB)
但报告指出:
group ended before it began (--help for usage)
collect2: ld returned 1 exit status
make: *** [L3appl] Error 1
有人知道我的makefile怎么了吗???
谢谢你的帮助 将
LIB:=-L../LIB/$(LIBSB)
更改为LIB:=-L../LIB$(LIBSB)
尝试插入空格:LIB:=-L../LIB/$(LIBSB)
。