ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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?
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.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.