Linux - Kernel This forum is for all discussion relating to the Linux kernel. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-25-2007, 04:58 AM
|
#1
|
Member
Registered: May 2006
Location: Chennai, India
Posts: 74
Rep:
|
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)
|
|
|
05-25-2007, 05:27 AM
|
#2
|
Member
Registered: May 2006
Location: Chennai, India
Posts: 74
Original Poster
Rep:
|
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.
|
|
|
05-25-2007, 05:45 AM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
05-25-2007, 09:36 AM
|
#4
|
Member
Registered: May 2006
Location: Chennai, India
Posts: 74
Original Poster
Rep:
|
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.
|
|
|
08-07-2008, 08:39 AM
|
#5
|
LQ Newbie
Registered: Aug 2008
Posts: 1
Rep:
|
Help me
I have same problem. However, I don't understand your answer. Could you please explain clearer for me?
|
|
|
All times are GMT -5. The time now is 04:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|