LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2002, 08:00 AM   #1
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

Rep: Reputation: 136Reputation: 136
Unhappy getting started with qt3


recently installed qt but not yet working:

//test progrm 'main.cpp'

#include <qapplication.h>
#include <qpushbutton.h>

int main(int argc, char **argv)
{
QApplication a(argc, argv);
QPushButton hello("Hello LQ!", 0);
hello.resize(100,30);
a.setMainWidget( &hello);
hello.show();
return a.exec();
}

i ran
qmake -project
qmake
make

and the make command gives an error:
...undefined reference to QApplication::QApplication (int &, char **)
and so on for each line of the progrm

as in the INSTALL i added the QTDIR to my .profile before making qt

QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/doc/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

export QTDIR PATH MANPATH LD_LIBRARY_PATH

if i try to run examples from qt/examples/ : cant connect to x server!

so i guess i need some help to get started, cheers
jens
 
Old 07-20-2002, 03:37 PM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

Original Poster
Rep: Reputation: 136Reputation: 136
shit i reinstalled everything twice - the same result
during compiling i got the following message a couple times:
session management error: Authentication Rejected reason: none of the authentication protocols are supported and host-based authentication failed
(many times with files ending with .uic)
i guess that's why it dont work but i dont know how to change it. so if u know drop me some lines,plz!
thank you, jens

Last edited by j-ray; 07-20-2002 at 03:38 PM.
 
Old 07-20-2002, 04:08 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 171Reputation: 171
Can't connect to X server means you're trying to run an X program from console. This won't work. First start X, then (for example from a terminal) your program.
 
Old 07-31-2002, 03:47 PM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

Original Poster
Rep: Reputation: 136Reputation: 136
i was a couple days biking so my reply took a while. actually i had started x before trying that but it seems qt can't find the connection. i don't know what's wrong with the entire installation. i thought maybe it's caused by my gcc 2.95.3. Does it make sense to try a newer version? i don't have a better idea yet.
cheers, jens
 
Old 08-01-2002, 02:35 AM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 171Reputation: 171
Do all other qt programs work?
If they do, you may try with another compiler version...
 
Old 08-01-2002, 11:12 AM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

Original Poster
Rep: Reputation: 136Reputation: 136
no, nothing works yet. neither the little test programs from the qt tutorial nor the given examples. i downloaded gcc 3.1.1 yesterday and gonna install it later to give qt another try. if i don't get it going i'll post again. or do u see other opportunities? thanks! jens
 
Old 08-01-2002, 11:37 AM   #7
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

Original Poster
Rep: Reputation: 136Reputation: 136
ooh la la! i have to correct myself. the given examples today work fine and the programs from the tutorial directory, too. the only ones i have to worry about are the programs i write myself to home directory. it seems the qt header files can't be found then.
p.s.:
reading thru some other posts i found out that there is no /usr/lib/qt3 on my machine, just /usr/lib/qt.2.3 and a symlink qt2. should i find that irritating?
cheers jens
 
Old 08-01-2002, 02:05 PM   #8
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 171Reputation: 171
It looks you don't have qt3 installed (or maybe it's hidden somewhere).
 
  


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
Qt3 SpEcIeS SUSE / openSUSE 3 04-22-2005 06:28 PM
Qt3.3 vs Qt 3.2 irfanhab Programming 0 05-11-2004 02:28 AM
qt3 samon Linux - General 3 01-28-2004 05:00 PM
About qt3... LI-6Y LUCY Programming 3 08-28-2003 09:45 AM
Help Qt3 Zion Linux - General 15 07-22-2002 06:27 AM

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

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