LinuxQuestions.org
Help answer threads with 0 replies.
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 07-30-2009, 01:22 AM   #1
bharath285
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore
Posts: 2

Rep: Reputation: 0
Problem in Makefile


Hi,
I am very new to this forum as well as linux. I am using fedora9. Following code is the contents of my Makefile.

CC=g++

all: main

LIBS+=/usr/lib/libQtDBus.so.4

PATH=/opt/qtsdk-2009.02/qt/include/

INCLUDE+=$(PATH)QtDBus \
-I$(PATH)QtCore

main: main.o
$(CC) main.o -o main -L$(LIBS)

main.o: main.cpp
$(CC) -c main.cpp -I$(INCLUDE)

clean:
rm -rf *.o main



And I am getting following error while runnning make.

[bharath@bharath-sys sample]$ make
g++ -c main.cpp -I/opt/qtsdk-2009.02/qt/include/QtDBus -I/opt/qtsdk-2009.02/qt/include/QtCore
make: g++: Command not found
make: *** [main.o] Error 127


Please help me to get out of it.........

Thanks & Regards,
Bharath

Last edited by bharath285; 07-30-2009 at 01:49 AM.
 
Old 07-30-2009, 02:12 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by bharath285 View Post
[bharath@bharath-sys sample]$ make
g++ -c main.cpp -I/opt/qtsdk-2009.02/qt/include/QtDBus -I/opt/qtsdk-2009.02/qt/include/QtCore
make: g++: Command not found
make: *** [main.o] Error 127


Please help me to get out of it.........

Thanks & Regards,
Bharath
The problem looks obvious: you don't have g++ installed. Have you been able to compile C++ programs before (i.e. have you been able to use g++ on this machine before)? If not, then install g++ using your distribution's package management system (note that other packages will probably have to be installed too). If you need more help, then tell us which distribution you're using and what exactly you need help with.
 
Old 07-30-2009, 02:42 AM   #3
adityasharma
Member
 
Registered: Jun 2009
Location: Noida
Distribution: RHEL 5
Posts: 39

Rep: Reputation: 16
Smile

Quote:
Originally Posted by bharath285 View Post
Hi,
I am very new to this forum as well as linux. I am using fedora9. Following code is the contents of my Makefile.

CC=g++

all: main

LIBS+=/usr/lib/libQtDBus.so.4

PATH=/opt/qtsdk-2009.02/qt/include/

INCLUDE+=$(PATH)QtDBus \
-I$(PATH)QtCore

main: main.o
$(CC) main.o -o main -L$(LIBS)

main.o: main.cpp
$(CC) -c main.cpp -I$(INCLUDE)

clean:
rm -rf *.o main



And I am getting following error while runnning make.

[bharath@bharath-sys sample]$ make
g++ -c main.cpp -I/opt/qtsdk-2009.02/qt/include/QtDBus -I/opt/qtsdk-2009.02/qt/include/QtCore
make: g++: Command not found
make: *** [main.o] Error 127


Please help me to get out of it.........

Thanks & Regards,
Bharath
hey what Flavour are u using
if u know how to user yum

do yum list |grep gcc*
let us know if it is installed or not
then do a yum install GCC


for this you need to have Yum configured and have the server packages in you machine
 
Old 07-30-2009, 02:53 AM   #4
bharath285
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks, I got a soln

Problem is not with g++, problem is in declaring INCLUDE.
Now its working.
Thanks for ur reply.
 
  


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
Is it mandatory to have the name of the makefile as 'Makefile' for kernal module comp narender.d Linux - Kernel 3 05-29-2009 07:26 AM
Problem with a makefile imperialbeachdude General 9 07-30-2007 01:12 PM
problem with Makefile shifter Programming 1 07-27-2007 05:31 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 04:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 01:23 PM


All times are GMT -5. The time now is 06:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration