LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-16-2003, 10:05 PM   #1
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Rep: Reputation: 15
Unhappy QT compiling always fails


Hi,

I am a newbie and have a preinstalled QT designer. It comes with the library at /usr/lib/qt3/include.

Every time i do 'make' after 'qmake' it says :

g++ -c -pipe -Wall -W -O2 -fomit-frame-pointer -pipe -march=i586 -mcpu=pentiumpro -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I. -I/include -o main.o main.cpp
In file included from /usr/lib/qt3/include/qobjectdefs.h:42,
from /usr/lib/qt3/include/qwindowdefs.h:43,
from /usr/lib/qt3/include/qwidget.h:42,
from /usr/lib/qt3/include/qdesktopwidget.h:40,
from /usr/lib/qt3/include/qapplication.h:42,
from main.cpp:7:
/usr/lib/qt3/include/qglobal.h:710:21: qconfig.h: No such file or directory
/usr/lib/qt3/include/qglobal.h:773:23: qfeatures.h: No such file or directory
make: *** [main.o] Error 1

What's wrong, the library is there on the place, this give me a lot of headache. Please anyone bring me the magic cure.

Thanks
 
Old 08-17-2003, 02:14 AM   #2
esben
Member
 
Registered: Jun 2003
Location: Copenhagen, Denmark
Distribution: Gentoo
Posts: 48

Rep: Reputation: 15
Try searching for qglobal.h. E.g., try locate qglobal.h and post the result here.
 
Old 08-18-2003, 01:24 PM   #3
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
I ran :
# locate qglocal.h
the result :
/usr/lib/qt3/qglobal.h

is there ...

Did the error has something to do with the QTDIR variable
Could it be that the QTDIR has not been configured properly or misconfigured ?
 
Old 08-18-2003, 01:25 PM   #4
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
I ran :
# locate qglocal.h
the result :
# /usr/lib/qt3/include/qglobal.h

is there (i think)...

Did the error has something to do with the QTDIR variable.
Could it be that the QTDIR has not been configured properly or misconfigured ?
 
Old 08-19-2003, 03:14 PM   #5
esben
Member
 
Registered: Jun 2003
Location: Copenhagen, Denmark
Distribution: Gentoo
Posts: 48

Rep: Reputation: 15
Quote:
Originally posted by Hitokiri
I ran :
# locate qglocal.h
the result :
# /usr/lib/qt3/include/qglobal.h

is there (i think)...

Did the error has something to do with the QTDIR variable.
Could it be that the QTDIR has not been configured properly or misconfigured ?
Maybe... your QTDIR environment variable should be set to /usr/lib/qt3 in your case... actually, looking at this bit from your compile line

..sr/lib/qt3//mkspecs/de..

it seems very probable. Try echo $QTDIR and see what it is set to.
 
Old 08-20-2003, 11:12 AM   #6
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
I ran :
# echo $QTDIR
result :
blank ....

Any suggestion ?
 
Old 08-20-2003, 02:37 PM   #7
esben
Member
 
Registered: Jun 2003
Location: Copenhagen, Denmark
Distribution: Gentoo
Posts: 48

Rep: Reputation: 15
Try setting it to "/usr/lib/qt3"....
 
Old 08-22-2003, 07:12 AM   #8
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
I put QTDIR=/usr/lib/qt3
in my /etc/profile and I re-login

I re-run
#/usr/lib/qt3/bin/qmake -o Makefile mypro.pro
#make

result
In file included from .ui/metrixconv.cpp:10:
.ui/metrixconv.h:13:22: qvariant.h: No such file or directory
.ui/metrixconv.h:14:21: qdialog.h: No such file or directory
In file included from .ui/metrixconv.cpp:10:
.ui/metrixconv.h:26: parse error before `{' token
.ui/metrixconv.h:31: destructors must be member functions
.ui/metrixconv.h:47: parse error before `public'
.ui/metrixconv.cpp:12:22: qvariant.h: No such file or directory
.ui/metrixconv.cpp:13:23: qcombobox.h: No such file or directory
.ui/metrixconv.cpp:14:20: qlabel.h: No such file or directory
.ui/metrixconv.cpp:15:23: qlineedit.h: No such file or directory
.ui/metrixconv.cpp:16:25: qpushbutton.h: No such file or directory
.ui/metrixconv.cpp:17:22: qspinbox.h: No such file or directory
.ui/metrixconv.cpp:18:21: qlayout.h: No such file or directory
.ui/metrixconv.cpp:19:22: qtooltip.h: No such file or directory
.ui/metrixconv.cpp:20:24: qwhatsthis.h: No such file or directory
.ui/metrixconv.cpp:21:20: qimage.h: No such file or directory
.ui/metrixconv.cpp:22:21: qpixmap.h: No such file or directory
In file included from .ui/metrixconv.cpp:24:
metrixconv.ui.h:9:24: qvalidator.h: No such file or directory
In file included from .ui/metrixconv.cpp:24:
metrixconv.ui.h:10: syntax error before `::' token
metrixconv.ui.h:13: syntax error before `->' token
metrixconv.ui.h:14: ISO C++ forbids declaration of `convert' with no type
metrixconv.ui.h:15: syntax error before `->' token
metrixconv.ui.h:17: syntax error before `::' token
metrixconv.ui.h:33: invalid use of undefined type `struct QLineEdit'
.ui/metrixconv.h:21: forward declaration of `struct QLineEdit'
metrixconv.ui.h:37: parse error before `switch'
metrixconv.ui.h:52: parse error before `switch'
metrixconv.ui.h:65: `decimalsSpinBox' was not declared in this scope
metrixconv.ui.h:66: syntax error before `->' token
metrixconv.ui.h:67: syntax error before `->' token
.ui/metrixconv.cpp:32: `QWidget' was not declared in this scope
.ui/metrixconv.cpp:32: `parent' was not declared in this scope
.ui/metrixconv.cpp:32: parse error before `char'
.ui/metrixconv.cpp:33: invalid use of undefined type `class Form1'
.ui/metrixconv.h:25: forward declaration of `class Form1'
.ui/metrixconv.cpp: In constructor `Form1::Form1(...)':
.ui/metrixconv.cpp:33: `parent' undeclared (first use this function)
.ui/metrixconv.cpp:33: (Each undeclared identifier is reported only once for each function it appears in.)
.ui/metrixconv.cpp:33: `name' undeclared (first use this function)
.ui/metrixconv.cpp:33: `modal' undeclared (first use this function)
.ui/metrixconv.cpp:33: `fl' undeclared (first use this function)
.ui/metrixconv.cpp:33: class `Form1' does not have any field named `QDialog'
.ui/metrixconv.cpp:37: `setName' undeclared (first use this function)
.ui/metrixconv.cpp:39: invalid use of undefined type `struct QSpinBox'
.ui/metrixconv.h:23: forward declaration of `struct QSpinBox'
.ui/metrixconv.cpp:40: `QRect' undeclared (first use this function)
.ui/metrixconv.cpp:41: incomplete type `QSpinBox' does not have member `UpDownArrows'
.ui/metrixconv.cpp:42: invalid use of undefined type `struct QSpinBox'
.ui/metrixconv.h:23: forward declaration of `struct QSpinBox'
.ui/metrixconv.cpp:43: invalid use of undefined type `struct QSpinBox'
.ui/metrixconv.h:23: forward declaration of `struct QSpinBox'
.ui/metrixconv.cpp:45: invalid use of undefined type `struct QLineEdit'
.ui/metrixconv.h:21: forward declaration of `struct QLineEdit'
.ui/metrixconv.cpp:47: incomplete type `QLineEdit' does not have member `AlignRight'
.ui/metrixconv.cpp:49: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:52: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:55: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:58: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:61: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:64: invalid use of undefined type `struct QPushButton'
.ui/metrixconv.h:22: forward declaration of `struct QPushButton'
.ui/metrixconv.cpp:67: invalid use of undefined type `struct QPushButton'
.ui/metrixconv.h:22: forward declaration of `struct QPushButton'
.ui/metrixconv.cpp:70: `FALSE' undeclared (first use this function)
.ui/metrixconv.cpp:70: invalid use of undefined type `struct QComboBox'
.ui/metrixconv.h:19: forward declaration of `struct QComboBox'
.ui/metrixconv.cpp:73: invalid use of undefined type `struct QComboBox'
.ui/metrixconv.h:19: forward declaration of `struct QComboBox'
.ui/metrixconv.cpp:76: invalid use of undefined type `struct QLineEdit'
.ui/metrixconv.h:21: forward declaration of `struct QLineEdit'
.ui/metrixconv.cpp:78: incomplete type `QLineEdit' does not have member `AlignRight'
.ui/metrixconv.cpp:80: invalid use of undefined type `struct QPushButton'
.ui/metrixconv.h:22: forward declaration of `struct QPushButton'
.ui/metrixconv.cpp:82: `languageChange' undeclared (first use this function)
.ui/metrixconv.cpp:83: `QSize' undeclared (first use this function)
.ui/metrixconv.cpp:83: `minimumSizeHint' undeclared (first use this function)
.ui/metrixconv.cpp:83: `resize' undeclared (first use this function)
.ui/metrixconv.cpp:86: `clicked' undeclared (first use this function)
.ui/metrixconv.cpp:86: `SIGNAL' undeclared (first use this function)
.ui/metrixconv.cpp:86: `clear' undeclared (first use this function)
.ui/metrixconv.cpp:86: `SLOT' undeclared (first use this function)
.ui/metrixconv.cpp:86: `connect' undeclared (first use this function)
.ui/metrixconv.cpp:88: `setFocus' undeclared (first use this function)
.ui/metrixconv.cpp:89: `close' undeclared (first use this function)
.ui/metrixconv.cpp:91: parse error before `)' token
.ui/metrixconv.cpp:92: parse error before `)' token
.ui/metrixconv.cpp:93: parse error before `)' token
.ui/metrixconv.cpp:96: `setTabOrder' undeclared (first use this function)
.ui/metrixconv.cpp:105: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:106: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:107: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:108: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:109: invalid use of undefined type `struct QLabel'
.ui/metrixconv.h:20: forward declaration of `struct QLabel'
.ui/metrixconv.cpp:110: `init' undeclared (first use this function)
.ui/metrixconv.cpp: At global scope:
.ui/metrixconv.cpp:117: invalid use of undefined type `class Form1'
.ui/metrixconv.h:25: forward declaration of `class Form1'
.ui/metrixconv.cpp:126: invalid use of undefined type `class Form1'
.ui/metrixconv.h:25: forward declaration of `class Form1'
.ui/metrixconv.cpp: In member function `void Form1::languageChange()':
.ui/metrixconv.cpp:127: `tr' undeclared (first use this function)
.ui/metrixconv.cpp:127: `setCaption' undeclared (first use this function)
.ui/metrixconv.cpp:135: invalid use of undefined type `struct QComboBox'
.ui/metrixconv.h:19: forward declaration of `struct QComboBox'
.ui/metrixconv.cpp:140: invalid use of undefined type `struct QComboBox'
.ui/metrixconv.h:19: forward declaration of `struct QComboBox'
make: *** [.obj/metrixconv.o] Error 1

Now I get syntax error too (I actually folowing the QT tutorial
 
Old 08-22-2003, 09:19 PM   #9
JanPihlgren
LQ Newbie
 
Registered: Aug 2003
Location: MÄRSTA, Sweden
Distribution: Mandrake 9.1
Posts: 3

Rep: Reputation: 0
You also have to set your QPATH to
QPATH=/usr/lib/qt3/bin
in your /etc/profile or in /home/"your userid"/.bashrc
 
Old 08-24-2003, 07:34 AM   #10
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
I've followed your advice, it didn't solve the problem.
Why do we have to set the QPATH to /usr/lib/qt3/bin ?
 
Old 03-19-2004, 01:31 AM   #11
tux89
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Rep: Reputation: 0
well at least you got as far as the make portion, i get a message saying qmake: command not found eveytime i try to build my program. Any ideas why it doesnt recognize the qmake command?
 
Old 03-19-2004, 01:50 AM   #12
JanPihlgren
LQ Newbie
 
Registered: Aug 2003
Location: MÄRSTA, Sweden
Distribution: Mandrake 9.1
Posts: 3

Rep: Reputation: 0
I work this way:
1.) Create my Qt program (*.ui and .ui.h and main.cpp)
2.) Run qmake -project (in the same direcory where the programfiles are located)
this vill create a *.pro
3.) Run qmake (that will create the Makefile
4.) make

point 2-3 is run only once
( * = the names of your files.)

qmake needs the $QPATH

I hope this will help you
 
Old 03-19-2004, 06:03 AM   #13
Tafta
Member
 
Registered: Jan 2003
Location: Bandung, Indonesia
Distribution: Mandrake, SUSE, RedHat
Posts: 55

Original Poster
Rep: Reputation: 15
actually it does

Wow, my program is now working
Ok i'll take the next headache

Thank you very much
 
  


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
insmod fails after compiling new kernel Brotherswing Linux - Hardware 4 02-17-2006 11:51 PM
compiling c++ fails classicalcraig Mandriva 2 03-01-2005 05:27 AM
compiling fails: kdelibs_export.h: No such file or directory drowstar Linux - Software 1 01-12-2005 11:35 AM
From kernel compiling sig11 fails-to boot fail-what's happening? wolve Linux - Newbie 3 06-30-2004 02:51 PM
Compiling emu10k1 fails hotel-lima Linux - Software 8 06-11-2004 07:08 PM

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

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