LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Makefile error : linker input file unused because linking not done (https://www.linuxquestions.org/questions/linux-newbie-8/makefile-error-linker-input-file-unused-because-linking-not-done-4175446683/)

Tushar@31 01-21-2013 09:43 PM

Makefile error : linker input file unused because linking not done
 
Hi,

I am cross-compiling a project for arm board. I am compiling some C source files + some libraries(c, C++). All objects files are getting created successfully but while linking for each object file i am getting error as below.

arm-unknown-linux-gnueabi-gcc: ./obj/dua.o: linker input file unused because linking not done
arm-unknown-linux-gnueabi-gcc: ./obj/duauser.o: linker input file unused because linking not done
arm-unknown-linux-gnueabi-gcc: ./obj/lldpcb.o: linker input file unused because linking not done

I am using following command in my makefile,

$(TARGET): $(LOCAL_LIBS) $(OBJS) GNUmakefile
@echo === Making $@ ====;
$(WHY)
if [ -f $@ ] ; then rm -f $@ ; fi
$(MAKEREVISION) $(REVISION_FILE) $(TARGET) $(REVISION) "$(DATE)"
$(CC) $(CPPFLAGS) -DOS_LINUX -DOS_DEBUG -O0 -g3 -Wall -fmessage-length=0 -MM -MP $(CGOPTS) $(CLOPTS) $(INC) -c $(REVISION_FILE) -o $(REVISION_OBJ)
$(CC) $(CFLAGS) $(CGOPTS) $(INC) \
$(OBJS) $(REVISION_OBJ) $(LOCAL_LIBS) $(LIBS) -o $@
rm -f $(REVISION_FILE) $(REVISION_OBJ)
cp $(TARGET) ../bin/.
$(STRIP) ../bin/$(TARGET)

where,
CC = /usr/bin/gcc
CXX = /usr/bin/g++
STRIP = /usr/bin/strip

CFLAGS = -DOS_LINUX -DOS_DEBUG -Os -g -Wall -c -fmessage-length=0 -MM -MP -o

CXXFLAGS = -DACE_NLOGGING -DACE_NTRACE -O0 -g -fno-omit-frame-pointer

Can anyone guide me ???

Thanks in advance!

pan64 01-22-2013 12:42 AM

that is the option -c.
please try to use [code][/code] blocks to keep formatting.


All times are GMT -5. The time now is 11:01 AM.