LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-26-2004, 02:31 PM   #1
dpp777
Member
 
Registered: May 2004
Location: Austin, Tx
Distribution: RHEL / Slackware
Posts: 33

Rep: Reputation: 15
problems with QT


Hello. I'm attempting to learn QT and am having some problems that hopefully someone can get me pointed in the right direction, as my google searches have not found the answer.

I'm running SuSE 9.0 and used the cds to install QT
I then created a directory and typed out a basic helloworld program froma tutorial
#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();
}

I then did qmake -project
no errors
I then ran qmake -no errors
and then I ran make and got the following erros:
g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/include -I/include -o hello.o hello.cpp
hello.cpp:1:26: qapplication.h: No such file or directory
hello.cpp:2:20: qlabel.h: No such file or directory
hello.cpp: In function `int main(int, char**)':
hello.cpp:5: error: `QApplication' undeclared (first use this function)
hello.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
hello.cpp:5: error: parse error before `(' token
hello.cpp:6: error: `QLabel' undeclared (first use this function)
hello.cpp:6: error: `label' undeclared (first use this function)
hello.cpp:6: error: parse error before `(' token
hello.cpp:7: error: `app' undeclared (first use this function)
hello.cpp:4: warning: unused parameter `int argc'
hello.cpp:4: warning: unused parameter `char**argv'
make: *** [hello.o] Error 1

Do I need a full path for my includes? if so where the heck do those things live? TIA!
 
Old 06-26-2004, 02:46 PM   #2
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
Most probably they live in /usr/lib/qt3/include.

Maybe time to get slocate running on your box?

TIM
 
Old 06-27-2004, 07:55 AM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You probably don't have qt-devel installed.
 
  


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
Ethernet Adsl Modem Driver Problems And Install Problems... akhilnair Linux - Hardware 12 11-28-2004 08:19 AM
cisco 350 wireless problems and suse x-server problems incognito9 Linux - Wireless Networking 5 10-14-2004 07:53 AM
Problems with OSS while trying to avoid problems in ALSA (scratchy sound) GT_Onizuka Linux - General 1 02-05-2004 11:55 PM
Problems, problems, problems. Lets start with the soundcard Kre8ive Linux - Newbie 5 08-07-2003 01:20 AM
Problems, problems, problems. Lets start with the ES 1868 AudioDrive Kre8ive Linux - Newbie 1 08-06-2003 07:04 PM

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

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