LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-25-2007, 04:58 AM   #1
asprakash
Member
 
Registered: May 2006
Location: Chennai, India
Posts: 74
Blog Entries: 3

Rep: Reputation: 18
Problem in Makefile-" No rule to make target "


Dear frineds,
I am trying to compile a sample GUI (using GTK+) program for an PDA device.I am using Linux-arm-gcc cross compiler.For that PDA,I have an Makefile. When I tried to "make" it, I am getting error, "No rules to make target 'arm-linux-g++',need by "./scandemo" stop."
I cant solve this problem. Help me,to solve this problem.Whats wrong in my Makefile?.
I have mentioned my Makefile below.

Makefile:
---------
CROSS = arm-linux-
CC = $(CROSS)gcc
CXX = $(CROSS)g++

CFLAGS = -Wall \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DUSE_SYSTEM_PWD_GRP \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
`pkg-config --cflags gtk+-2.0` \
-U__KERNEL__ -UDEBUG \
-I.

CXXFLAGS = $(CFLAGS)

LDFLAGS = `pkg-config --libs gtk+-2.0` -L. -lnls_fw

OBJS = demo.o
TARGET = ./scandemo

${TARGET} : $(OBJS) $(CXX) $(OBJS) -o ${TARGET} $(CFLAGS) $(LDFLAGS)

clean:
rm -f *.o $(TARGET)
 
Old 05-25-2007, 05:27 AM   #2
asprakash
Member
 
Registered: May 2006
Location: Chennai, India
Posts: 74

Original Poster
Blog Entries: 3

Rep: Reputation: 18
I did a mistake in the line,
${TARGET} : $(OBJS) $(CXX) $(OBJS) -o ${TARGET} $(CFLAGS) $(LDFLAGS)
instead of
${TARGET} : $(OBJS)
$(CXX) $(OBJS) -o ${TARGET} $(CFLAGS) $(LDFLAGS)
But still I m getting error,
"/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lgtk-x11-2.0
collect2: ld returned 1 exit status".
I tried to find lgtk-x11-2.0. But i cant find it in my pc.
But i have already installed GTK+ 2.0.
How can solve this problem.
Thanks n adv.
 
Old 05-25-2007, 05:45 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
Code:
I tried to find lgtk-x11-2.0. But i cant find it in my pc.
But i have already installed GTK+ 2.0.
Since you are cross compiling, don't you need the GTK+2.0 libraries for the arm processor? It doesn't matter if GTK+ 2.0 is installed because it needs to link in the arm libraries, not the ones for your Intel host system. Maybe if you are lucky, your target system has these libraries installed. It might be a matter of copying them under the /usr/local/arm/3.3.2/lib/ library directory tree. If not, you may need to cross compile the libraries as well.


---
As an aside,
Quote:
an PDA ... an Makefile ... getting error ... Makefile?.
The rule for whether you use "a" or "an" is the sound of the beginning of the next word. If the next word begins with a consonant sound, then use "a". If it begins with a vowel sound, use "an": a PDA; a Makefile; getting an error. In the last case you could use the definite article "the" since you are referring to the particular error. Also, please add two spaces after the period ending a sentence. With no spaces, it is hard to read.
Also, the question mark ends a sentence so "?." is redundant.
Also, capitalize the pronoun "I". "But I can't find it in my pc."

I hope you don't mind these corrections. Thanks.

Last edited by jschiwal; 05-25-2007 at 05:52 AM.
 
Old 05-25-2007, 09:36 AM   #4
asprakash
Member
 
Registered: May 2006
Location: Chennai, India
Posts: 74

Original Poster
Blog Entries: 3

Rep: Reputation: 18
Quote:

Since you are cross compiling, don't you need the GTK+2.0 libraries for the arm processor? It doesn't matter if GTK+ 2.0 is installed because it needs to link in the arm libraries, not the ones for your Intel host system. Maybe if you are lucky, your target system has these libraries installed. It might be a matter of copying them under the /usr/local/arm/3.3.2/lib/ library directory tree. If not, you may need to cross compile the libraries as well.


---
As an aside,
Thank you.
Quote:
The rule for whether you use "a" or "an" is the sound of the beginning of the next word. If the next word begins with a consonant sound, then use "a". If it begins with a vowel sound, use "an": a PDA; a Makefile; getting an error. In the last case you could use the definite article "the" since you are referring to the particular error. Also, please add two spaces after the period ending a sentence. With no spaces, it is hard to read.
Also, the question mark ends a sentence so "?." is redundant.
Also, capitalize the pronoun "I". "But I can't find it in my pc."

I hope you don't mind these corrections. Thanks.
No. U r welcome

Last edited by asprakash; 05-25-2007 at 09:37 AM.
 
Old 08-07-2008, 08:39 AM   #5
thainam83vn
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
Help me

I have same problem. However, I don't understand your answer. Could you please explain clearer for me?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
get this error when runnign make ***** "no rule to make target 'config'. stop" procfs Linux - General 4 05-12-2013 10:25 AM
Belkin Wirless G RTL8185L make[1]: *** No rule to make target `Makefile'. Stop. SilverRock Linux - Wireless Networking 2 02-11-2007 07:25 AM
Help with Installation. "No rule to make target.." Aries311 Linux - Software 2 07-02-2005 03:47 PM
Error "make: *** No rule to make target `install'. Stop." help Ohmn Mandriva 8 07-02-2004 07:02 PM
No rule to make target `/mkspecs/default/qmake.conf', needed by `Makefile'. Stop Julianus Linux - General 0 12-21-2003 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:21 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