LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 08-09-2003, 12:18 AM   #1
siphiuel
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Rep: Reputation: 0
Problems when trying to compile cpp files using qt headers


Hello. I have mandrake 9.1. I've tried to use qt assistant to learn gui programming (at least to see what it is). I have done everything exactly as it was written in the tutorial #1 of the qt assistant. But when i try to compile the file HelloWorld.cpp using make or g++ there are lots of errors saying about undefined references. What's wrong? Thanks in advance.
 
Old 08-09-2003, 07:09 AM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
Post the error messages. We can't see them, you can.

How to get good answers with your questions about Linux

# Mandrake links
Mandrake home page
Mandrake Users website
Easy urpmi config for Mandrake
urpmi mini-HOWTO
Easy software management: Red Carpet
Maximum RPM
rpmfind
You didn't install the developmental packages? As root, command:
urpmi gcc
An Introduction to the Midnight Commander. You can install it by commanding:
urpmi mc
Midnight Commander home page
 
Old 08-10-2003, 07:10 PM   #3
siphiuel
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry for replying so late. Here are the messages produced:

[blade@localhost qt]$ qmake -project
[blade@localhost qt]$ qmake
[blade@localhost qt]$ make
g++ -o qt qt.o -L/usr/X11R6/lib -lXext -lX11 -lm
qt.o(.text+0x30): In function `main':
: undefined reference to `QApplication::QApplication[in-charge](int&, char**)'
qt.o(.text+0x40): In function `main':
: undefined reference to `QString::QString[in-charge](char const*)'
qt.o(.text+0x62): In function `main':
: undefined reference to `QPushButton::QPushButton[in-charge](QString const&, QWidget*, char const*)'
qt.o(.text+0x7d): In function `main':
: undefined reference to `QString::shared_null'
qt.o(.text+0x87): In function `main':
: undefined reference to `QStringData::deleteSelf()'
qt.o(.text+0xa4): In function `main':
: undefined reference to `QPushButton::resize(int, int)'
qt.o(.text+0xb0): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
qt.o(.text+0xb8): In function `main':
: undefined reference to `QWidget::show()'
qt.o(.text+0xc0): In function `main':
: undefined reference to `QApplication::exec()'
qt.o(.text+0xca): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
qt.o(.text+0xd2): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
qt.o(.text+0xfe): In function `main':
: undefined reference to `QString::shared_null'
qt.o(.text+0x108): In function `main':
: undefined reference to `QStringData::deleteSelf()'
qt.o(.text+0x116): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
qt.o(.text+0x126): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
collect2: ld returned 1 exit status
make: *** [qt] Error 1
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile a C++ file (.cpp) with allegro? RHLinuxGUY Programming 5 11-29-2005 02:06 AM
How do I compile a *.cpp Document in linux? njbrain Linux - Software 9 01-29-2004 07:43 PM
compile programs in c and cpp Manjula.S Linux - Software 2 10-15-2003 01:06 AM
Problems when trying to compile cpp files using qt headers siphiuel Linux - Software 2 08-12-2003 04:41 AM
to compile cpp on linux mandrake manpreet Programming 1 04-26-2001 12:45 AM


All times are GMT -5. The time now is 02:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration