LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-17-2006, 11:00 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
compiling a simple program with qt


I followed the directions at http://doc.trolltech.com/4.1/tutorial-t1.html to try to compile the example there called main.cpp. I have libqt3-mt. I just installed libqt2-mt-dev and all of the dependencies it needs. I do not know why I am getting these errors. What should I do?

chris@ubuntu:~/qt$ qmake -project
chris@ubuntu:~/qt$ qmake
chris@ubuntu:~/qt$ make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/share/qt3/include -o main.o main.cpp
main.cpp:1:28: error: QApplication: No such file or directory
main.cpp:2:27: error: QPushButton: No such file or directory
main.cpp: In function ‘int main(int, char**)’:
main.cpp:6: error: ‘QApplication’ was not declared in this scope
main.cpp:6: error: expected `;' before ‘app’
main.cpp:8: error: ‘QPushButton’ was not declared in this scope
main.cpp:8: error: expected `;' before ‘hello’
main.cpp:9: error: ‘hello’ was not declared in this scope
main.cpp:12: error: ‘app’ was not declared in this scope
main.cpp: At global scope:
main.cpp:4: warning: unused parameter ‘argc’
main.cpp:4: warning: unused parameter ‘argv’
make: *** [main.o] Error 1
chris@ubuntu:~/qt$ ls
main.cpp Makefile qt.pro
chris@ubuntu:~/qt$
 
Old 01-18-2006, 01:33 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
that tutorial is for Qt4
 
  


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
Problems compiling a simple shell program yekrahs Programming 3 09-26-2005 12:07 PM
Compiling a simple C++ program for Windows Baix Programming 2 03-05-2005 07:17 PM
compiling simple c/c++ program but no good freeindy Programming 3 02-12-2005 11:38 AM
Compiling a simple C++ program kbeaver Programming 27 02-06-2004 08:02 PM
Compiling a simple Mesa/GLUT program Bojdom Linux - Software 2 02-02-2003 04:19 PM

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

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