when linking the objects, make reports: group ended before it began?

匿名 (未验证) 提交于 2019-12-03 01:09:02

问题:

I need to link my objects to library files from others. Thus, in my makefile, I write like this:

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) 

but the make reports:

group ended before it began (--help for usage) collect2: ld returned 1 exit status make: *** [L3appl] Error 1

Is there someone know what's the matter with my makefile??? thx for your help!!!

回答1:

change LIB := -L../lib/$(LIBSB) to LIB := -L../lib $(LIBSB)



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!