Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1795 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  probleme compilation Qt

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

probleme compilation Qt

n°1311753
blastman
just me !
Posté le 22-02-2006 à 19:06:56  profilanswer
 

bonjour tout le monde
 
Je viens d'installer Qt sur mon windows avec dev-c++, j'ai crée un template pour pouvoir créer des projet Qt à partir de l'assistant de Dev-c++, cette opération je l'avais déjà effectué il y a quelques temps et je n'avais aucun problème, seuleument là le compilo me retourne des erreur et je ne vois pas comment résoudre ce problème
 
1-Qt4.template

Code :
  1. [Template]
  2. ver=1
  3. Name=Qt 4
  4. Icon=
  5. Description=Projet Qt 4
  6. Catagory=Qt 4
  7. [Unit0]
  8. CppName=main.cpp
  9. Cpp=Qt4.txt
  10. [Project]
  11. UnitCount=1
  12. Type=0
  13. Linker=C:/Qt/4.1.0/lib/libQt3Support4.a_@@_C:/Qt/4.1.0/lib/libQtAssistantClient.a_@@_...
  14. Includes=C:/Qt/4.1.0/include;C:/Qt/4.1.0/include/ActiveQt;C:/Qt/4.1.0/include/Qt;...
  15. Name=Qt 4



Qt4.txt
 (me sert de base à chaque création de nouveau projet Qt)

Code :
  1. #include <QApplication>
  2. #include <QDialog>
  3. int main(int argc, char *argv[])
  4. {
  5.     QApplication app(argc, argv);
  6.     QDialog *window = new QDialog;
  7.     window->show();
  8.     return app.exec();
  9. }


 
erreur lors de la compilation d'un nouveau projet :

Code :
  1. Compilateur: Default compiler
  2. Building Makefile: "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win"
  3. Exécution de  make...
  4. make.exe -f "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win" all
  5. g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/Qt/4.1.0/include"  -I"C:/Qt/4.1.0/include/ActiveQt"  -I"C:/Qt/4.1.0/include/Qt"  -I"..." 
  6. main.cpp:1:24: QApplication: No such file or directory
  7. main.cpp:2:19: QDialog: No such file or directory
  8. main.cpp: In function `int main(int, char**)':
  9. main.cpp:5: error: `QApplication' undeclared (first use this function)
  10. main.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
  11. main.cpp:5: error: expected `;' before "app"
  12. main.cpp:6: error: `QDialog' undeclared (first use this function)
  13. main.cpp:6: error: `window' undeclared (first use this function)
  14. main.cpp:6: error: `QDialog' has not been declared
  15. main.cpp:9: error: `app' undeclared (first use this function)
  16. make.exe: *** [main.o] Error 1
  17. Exécution terminée


 
pouvez vous m'aider svp ?


---------------
http://www.blastmanu.info
mood
Publicité
Posté le 22-02-2006 à 19:06:56  profilanswer
 

n°1311758
skelter
Posté le 22-02-2006 à 19:16:18  profilanswer
 

Citation :

   Compilateur: Default compiler
    Building Makefile: "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win"
    Exécution de  make...
    make.exe -f "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win" all
    g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/Qt/4.1.0/include"  -I"C:/Qt/4.1.0/include/ActiveQt"  -I"C:/Qt/4.1.0/include/Qt"  -I"..."    
     
    main.cpp:1:24: QApplication: No such file or directory
    main.cpp:2:19: QDialog: No such file or directory

    main.cpp: In function `int main(int, char**)':
    main.cpp:5: error: `QApplication' undeclared (first use this function)
    main.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
    main.cpp:5: error: expected `;' before "app"
    main.cpp:6: error: `QDialog' undeclared (first use this function)
    main.cpp:6: error: `window' undeclared (first use this function)
    main.cpp:6: error: `QDialog' has not been declared
     
    main.cpp:9: error: `app' undeclared (first use this function)
    make.exe: *** [main.o] Error 1
    Exécution terminée

n°1311771
nargy
Posté le 22-02-2006 à 19:27:45  profilanswer
 

essaye:
#include <qapplication.h>
 

n°1311773
blastman
just me !
Posté le 22-02-2006 à 19:28:16  profilanswer
 

je comprend bien qu'il ne trouve pas les fichier d'en-tête mais je vois pas pourquoi
 
 
j'ai essayé qapplication.h mais ca ne change rien  [:airforceone]


Message édité par blastman le 22-02-2006 à 19:30:23

---------------
http://www.blastmanu.info
n°1311774
skelter
Posté le 22-02-2006 à 19:30:13  profilanswer
 

ben regarde dans la doc de qt et regarde si cpp peut trouver le chemin des headers (sinon option -I)

n°1311778
blastman
just me !
Posté le 22-02-2006 à 19:34:45  profilanswer
 


Code :
  1. Compilateur: Default compiler
  2. Building Makefile: "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win"
  3. Exécution de  make...
  4. make.exe -f "C:\Documents and Settings\blastmanu\Mes documents\Makefile.win" all
  5. g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/Qt/4.1.0/include"  -I"C:/Qt/4.1.0/include/ActiveQt"  -I"C:/Qt/4.1.0/include/Qt"  -I"..." 
  6. g++.exe main.o  -o "Projet1.exe" -L"C:/Dev-Cpp/lib" -mwindows C:/Qt/4.1.0/lib/libQt3Support4.a C:/Qt/4.1.0/lib/libQtAssistantClient.a ...
  7. C:\Dev-Cpp\Bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: ...: No such file: Permission denied
  8. collect2: ld returned 1 exit status
  9. make.exe: *** [Projet1.exe] Error 1
  10. Exécution terminée


 :heink:  
 


---------------
http://www.blastmanu.info
n°1311784
skelter
Posté le 22-02-2006 à 19:46:03  profilanswer
 

et t'as verifié la présence (l'accessibilité) des fichiers ?


Message édité par skelter le 22-02-2006 à 19:46:37
n°1311787
blastman
just me !
Posté le 22-02-2006 à 19:51:35  profilanswer
 

oui et ils y sont, je pense tout réinstaller ou alors repasser à Qt3 (à l'époque j'avais eu auun problème avec Qt3)


---------------
http://www.blastmanu.info
n°1311855
nargy
Posté le 22-02-2006 à 21:54:50  profilanswer
 

J utilise Qt sous linux. Qt est fourni avec l utilitaire qmake. il connait où se trouve les librairies et les headers. Essaye qmake -h dans un shell. Il peut te créer le makefile qu il faut... tu devra quand même te débrouiller après avec dev-c++.

n°1352369
Maxime81
Posté le 23-04-2006 à 21:20:49  profilanswer
 

Regarde où qt a été installé et compare, chez moi il m'avait créé un dossier de trop, j'ai deplacé vers c:\qt4 (il etait dans un sous dossier 4.1.2) et après ca a marché.

mood
Publicité
Posté le 23-04-2006 à 21:20:49  profilanswer
 

n°1352396
blastman
just me !
Posté le 23-04-2006 à 22:24:15  profilanswer
 

ouh là, c'est vieux ca lol depuis je suis passé à code::block Qt fonctionne nickel dessus, en ce qui concerne mon problème avec Dev-C++ je l'avais réglé mais je ne sais plus comment.
 
merci quand même pour l'intéret que vous avez porté a ce thread ;)


Message édité par blastman le 23-04-2006 à 22:27:10

---------------
http://www.blastmanu.info

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  probleme compilation Qt

 

Sujets relatifs
[visual 2003] [ifstream] problème de tellg en ios::binaryVC++ -> add existing item to a project => problème?!
Problème à la noix sur tableau de valeur JS/HTMLProbleme de variables et de boucle (DOS)
[js]probleme de champs grisésproblème de redirection
VBA - Probleme Appel de fonctionProblème avec richtextbox et mysql.
Problème de lenteur d'accès MySQL[Delphi] Problème Delphi Teechart 6
Plus de sujets relatifs à : probleme compilation Qt


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR