LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2006, 02:26 PM   #1
MaTrIx709
Member
 
Registered: May 2004
Location: UK
Distribution: Debian Testing
Posts: 70

Rep: Reputation: 15
QT Hello world "make: Nothing to be done for `first'."


Hi all,

I'm trying to compile the hello world program in my book and I get the following error:
Code:
make: Nothing to be done for `first'.
Here is my console output:

Code:
$ qmake -project && qmake hello.pro && make
make: Nothing to be done for `first'.
$

Here is my program
Code:
#include <qapplication.h>
#include <qlabel.h>


int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	QLabel *label = new QLabel("Hello QT!",0);
	app.setMainWidget(label);
	label->show();
	return app.exec();
}
Any help would be very much appreciated.
 
Old 11-06-2006, 02:46 PM   #2
_john_i_
Member
 
Registered: Aug 2003
Location: Austin, TX
Distribution: Linux from Scratch
Posts: 52

Rep: Reputation: 15
After the "qmake -project" look to see if it created a "hello.pro". For me it creates "qt.pro". I have to rename to "qt.pro" to "hello.pro", and then "qmake hello.pro" followed by "make" works.
 
Old 11-06-2006, 03:18 PM   #3
MaTrIx709
Member
 
Registered: May 2004
Location: UK
Distribution: Debian Testing
Posts: 70

Original Poster
Rep: Reputation: 15
Qmake seems to have output the correct .pro file

Code:
$ls
hello.ccp  hello.ccp~  hello.pro  Makefile
$
 
Old 11-06-2006, 07:59 PM   #4
greymaus
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
When I have a .pro file (as you have hello.pro) I just type "make" (without the quote marks, of course) and I get an executable, with no extension. In your case, that should be "hello".
 
Old 11-07-2006, 02:48 AM   #5
MaTrIx709
Member
 
Registered: May 2004
Location: UK
Distribution: Debian Testing
Posts: 70

Original Poster
Rep: Reputation: 15
From what I read in my QT book, I should get an executable just like greymaus says.

Here is some more information incase anyone else wants to jump in and help.

I'm running Debian Etch.
As far as I'm aware, I've installed all the required libraries
 
Old 11-07-2006, 03:28 AM   #6
_john_i_
Member
 
Registered: Aug 2003
Location: Austin, TX
Distribution: Linux from Scratch
Posts: 52

Rep: Reputation: 15
Maybe qmake doesn't know what to do with a file with a ".ccp" extension. I've always used .cpp, .C, or .cc.
You might try renaming it to hello.cpp
 
Old 11-07-2006, 07:15 AM   #7
MaTrIx709
Member
 
Registered: May 2004
Location: UK
Distribution: Debian Testing
Posts: 70

Original Poster
Rep: Reputation: 15
I copied the hello.cpp file into two other places

Code:
$ cp hello.ccp hello.cc && cp hello.cpp hello.c
When I ran the following commands
Code:
$ qmake -project && qmake hello.pro && make
I received what look like compiler errors, which I never got before.

So, I think I am a step closer to getting the code to compile. I have to go back to work and will carry on in the evening.

Thanks all.
 
Old 11-07-2006, 01:22 PM   #8
MaTrIx709
Member
 
Registered: May 2004
Location: UK
Distribution: Debian Testing
Posts: 70

Original Poster
Rep: Reputation: 15
I fixed my problem:

I removed all files from the compile directory and tried to compile again. It worked this time.

I have one .cc file and used the command

Code:
$ qmake -project && qmake hello.pro && make && ./hello
Thanks for all the help
 
  


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
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
window maker "make" / "make install" problem xiekke Fedora 2 08-08-2007 10:55 AM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 03:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:43 PM.

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