LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2013, 09:43 PM   #1
Tushar@31
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
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!
 
Old 01-22-2013, 12:42 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
that is the option -c.
please try to use [code][/code] blocks to keep formatting.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux makefile linking error __line__ smilebhuff Linux - Newbie 1 05-03-2012 02:48 AM
c++ link error: file format not recognized; treating as linker ufmale Programming 4 04-24-2010 12:27 AM
[SOLVED] cryptic linker error (i really dont like linker errors); smeezekitty Programming 2 09-19-2009 02:21 AM
Linker is linking to the latest compiled changes manikan Programming 2 03-02-2006 10:41 AM
problems with linking objects -- must know some nasm\ASM\linker Paul6253 Programming 1 10-26-2004 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration