Fatal Error Qapplication.h No Such File Or Directory
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the qtgui/qapplication no such file or directory workings and policies of this site About Us Learn more about Stack
Qapplication No Such File Or Directory Ubuntu
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Qmainwindow No Such File Or Directory
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join
Qtgui/qapplication Qt5
them; it only takes a minute: Sign up Fatal error: qapplication.h: No such file or directory up vote 1 down vote favorite When I try to run my first program in QT I get the followinging error: /untitled1/main.cpp:1:26: fatal error: qapplication.h: No such file or directory #include ^ compilation terminated. make: * [main.o] Error 1 09:38:51: The process "/usr/bin/make" qapplication no such file or directory cmake exited with code 2. Error while building/deploying project untitled1 (kit: Desktop) When executing step 'Make' 09:38:52: Elapsed time: 00:01. Please help me. c++ qt share|improve this question edited Sep 6 '14 at 5:31 Quaxton Hale 94911137 asked Sep 6 '14 at 4:42 VashuDeo 86 1 Try including QT += widgets in your .pro file. –Quaxton Hale Sep 6 '14 at 4:47 where i found .pro in my system? –VashuDeo Sep 6 '14 at 4:48 It should be in the same directory as your source files. Also replace qapplication.h with –Quaxton Hale Sep 6 '14 at 4:50 i add these line in vashu.pro but still same error –VashuDeo Sep 6 '14 at 4:58 2 You are not running your program, you are trying to compile it! –Basile Starynkevitch Sep 6 '14 at 6:42 | show 1 more comment 1 Answer 1 active oldest votes up vote 2 down vote accepted Install Qt Creator from the Ubuntu Software Center (I know from reading your other question that you
download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). Home Qt Development Installation and Deployment [Solved] QApplication: No such file or directory [Solved] error: 'unicodeutf8' is not a member of 'qapplication' QApplication: No such file or directory This topic has been deleted. Only users qtgui qaction no such file or directory with topic management privileges can see it. jalomann last edited by I got Qt5 installed on Opensuse 12.2. I qwidget: no such file or directory tried to compile some example project that compiled successfully on Qt 4.8. Now I get error message "QApplication: No such file or directory" I think the PATH to library is missing while I http://stackoverflow.com/questions/25696849/fatal-error-qapplication-h-no-such-file-or-directory installed locally on /home/ Where should I edit? Reply Quote 0 sierdzio Moderators last edited by How do you include QApplication header? In Qt5, it resides in , while in Qt4 it was . (Z(:^ Reply Quote 1 Zlatomir last edited by I think the module isn't added in .pro file, so did you added QT += widgets in your .pro file? //anyway if the https://forum.qt.io/topic/22882/solved-qapplication-no-such-file-or-directory module is added the header can be included with #include you don't need or in Qt4 (that works with both Qt4 and 5) http://qt-project.org/groups/qt_romania Reply Quote 1 jalomann last edited by Adding QT += widgets in .pro file made the trick. Thanks. Reply Quote 0 Carel last edited by Why does qmake not include these, or what must one do in the source to ensure qmake auto generates this line in the .pro file ? Reply Quote 0 sierdzio Moderators last edited by qmake will never generate anything in your .pro file. Those files are config files for qmake to use, not the other way around. If you create a new project in recent versions of Qt Creator, this line will be added for you in standard app template. (Z(:^ Reply Quote 0 Carel last edited by Ooh ok, that make more sense now, thanks for the reply. Sorry for hijacking the thread by the way :D Reply Quote 0 Iotaprime last edited by The "Adding QT += widgets in .pro file" really helped me as well. Thanks. Reply Quote 0 realtebo last edited by I'm happy, too. I solved
publicus Member Registered: 2014-01-01 Posts: 129 [SOLVED] Unable to compile QT4 application This is the code that I have:#include #include https://bbs.archlinux.org/viewtopic.php?id=175142 int main(int argc, char * argv[]) { QApplication app(argc, argv); QWidget window; window.resize(250, 150); window.setWindowTitle("Simple example"); window.show(); return app.exec(); }This is the error that I get:g++ https://openclassrooms.com/forum/sujet/qapplication-no-such-file-or-directory-75433 -c -pipe -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt/mkspecs/linux-g++ -I. -I. -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -o hello_world.o hello_world.cpp hello_world.cpp:3:24: fatal no such error: QApplication: No such file or directory #include ^ compilation terminated. Makefile:298: recipe for target 'hello_world.o' failed make: *** [hello_world.o] Error 1These are the other threads that I researched.https://bbs.archlinux.org/viewtopic.php?id=66927https://bbs.archlinux.org/viewtopic.php?id=37815When I did a search for "qt4" in "/", this is what I got:./usr/include/qt4 ./usr/share/qt4 ./usr/share/licenses/qt4 ./usr/lib/qt4Now, why are these headers not detected? Last no such file edited by publicus (2014-01-03 18:21:27) Offline #2 2014-01-03 07:42:17 teekay Member Registered: 2011-10-26 Posts: 271 Re: [SOLVED] Unable to compile QT4 application Your g++ -I include paths point to Qt5. Offline #3 2014-01-03 12:32:32 publicus Member Registered: 2014-01-01 Posts: 129 Re: [SOLVED] Unable to compile QT4 application teekay wrote:Your g++ -I include paths point to Qt5.How do I set it to Qt4? Offline #4 2014-01-03 18:20:12 publicus Member Registered: 2014-01-01 Posts: 129 Re: [SOLVED] Unable to compile QT4 application I got it! I used the tool qtchooser to run qmake so that when the Makefile is generated, it's generated with Qt4 in mind. The process was something like this:qmake -project && qtchooser -run-tool=qmake -qt=4 && make Offline #5 2014-01-03 18:21:34 Scimmia Bug Wrangler Registered: 2012-09-01 Posts: 5,187 Re: [SOLVED] Unable to compile QT4 application There is also qmake-qt4 Online #6 2014-01-03 18:24:00 publicus Member Registered: 2014-01-01 Posts: 129 Re: [SOLVED] Unable to compile QT4 application Scimmia
Parcours Cours Partenaires Forums Premium S'inscrire Se connecter Inscription S'inscrire avec Facebook S'inscrire avec Google Wonder Prénom* Nom* Adresse email* Vous recevrez votre mot de passe sur cette adresse email. J'ai lu et j'accepte les Conditions Générales d'Utilisation.* S'inscrire Connexion Se connecter avec Facebook Se connecter avec Google Adresse email ou nom d'utilisateur* Mot de passe* Se souvenir de moi Mot de passe oublié Se connecter Pas encore membre ? Inscrivez-vous gratuitement en 30s. S'inscrire Se connecter Forums des Zéros Une question ? Pas de panique, on va vous aider ! Fil d'Ariane Accueil Forum Programmation Langage C++ QApplication : no such file or directory Liste des forums Partage QApplication : no such file or directory je doit etre maudit 1 2 >> Eliema 30 juin 2010 à 19:28:38 Bonjour, Je viens de ma lancer avec Qt mais il y a des problemes, quand je compile le meme code que Matheo, est noté: QApllication : no such file or directory. Pouvez-vous m'aider svp ? YellowTown 30 juin 2010 à 21:56:03 Montre nous ton code Eliema 1 juillet 2010 à 1:12:20 Voici mon code:#include #include int main(int argc, char* argv[]) { QApplicaton app(argc,argv); QPushButton bouton("Salut les zéros"); bouton.show(); return app.exec(); } C'est le code de base, il ne semble pas y avoir de probleme mais je pense donc que ce probleme est ailleurs, mais ou? S'il-vous plait, avez-vous une idée? hilnius 1 juillet 2010 à 1:49:31 il faut compiler avec la ligne de commande, comme l'explique mateo ici U118gs 1 juillet 2010 à 10:03:32 Salut, Pour les débutants je conseille vivement QtCreator, c'est beaucoup plus simple pour la compilation (pour info) Eliema 1 juillet 2010 à 11:52:38 J'ai suivi le cours de Mathéo mais c'est justement dans cette console que s'affiche les messages d'erreurs, la compilation devient alors impossible. alexisdm 1 juillet 2010 à 11:57:08 Montre nous l'ensemble des messages depuis le lancement de Qt Command Prompt jusqu'à l'erreur. Eventuellement, pour copier le texte au lieu de faire une captur