IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Qt Discussion :

probleme avec make


Sujet :

Qt

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 23
    Par défaut probleme avec make
    Slt a tous, je viens d'installé qt4 grâce au package libqt4-devel sur ma version mandriva 2008.0.Par la suite,J'ai essayé de compiler mes fichiers .cpp et .h reunis dans un seul et meme dossier. Je fais donc un qmake -project puis qmake jusque la aucun souci, puis a la commande make, voici ce qui s'affiche:
    [vincent@localhost qt]$ make
    g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/usr/lib/qt3/mkspecs/linux-g++ -I. -I. -I/usr/share/qt//include -o appliPlus.o appliPlus.cpp
    Dans le fichier inclus à partir de appliPlus.cpp:1:
    calculPlus.h:3:24: erreur: QApplication : Aucun fichier ou répertoire de ce type
    calculPlus.h:4:19: erreur: QWidget : Aucun fichier ou répertoire de ce type
    calculPlus.h:5:23: erreur: QVBoxLayout : Aucun fichier ou répertoire de ce type
    calculPlus.h:6:23: erreur: QHBoxLayout : Aucun fichier ou répertoire de ce type
    calculPlus.h:7:18: erreur: QLabel : Aucun fichier ou répertoire de ce type
    calculPlus.h:8:21: erreur: QLineEdit : Aucun fichier ou répertoire de ce type
    calculPlus.h:9:23: erreur: QPushButton : Aucun fichier ou répertoire de ce type
    calculPlus.h:10:19: erreur: QString : Aucun fichier ou répertoire de ce type
    calculPlus.h:11:19: erreur: QDialog : Aucun fichier ou répertoire de ce type
    In file included from appliPlus.cpp:1:
    calculPlus.h:13: erreur: expected class-name before ‘{’ token
    calculPlus.h:14: erreur: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
    calculPlus.h:15: erreur: expected ‘;’ before ‘public’
    calculPlus.h:18: erreur: ISO C++ forbids declaration of ‘QHBoxLayout’ with no type
    calculPlus.h:18: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:19: erreur: ISO C++ forbids declaration of ‘QVBoxLayout’ with no type
    calculPlus.h:19: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:20: erreur: ISO C++ forbids declaration of ‘QVBoxLayout’ with no type
    calculPlus.h:20: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:21: erreur: ISO C++ forbids declaration of ‘QGridLayout’ with no type
    calculPlus.h:21: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:24: erreur: ISO C++ forbids declaration of ‘QLineEdit’ with no type
    calculPlus.h:24: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:28: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:28: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:29: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:29: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:30: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:30: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:31: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:31: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:32: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:32: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:34: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:34: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:35: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:35: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:36: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:36: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:37: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:37: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:38: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:38: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:39: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:39: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:40: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:40: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:41: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:41: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:42: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:42: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:43: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:43: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:44: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:44: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:45: erreur: ISO C++ forbids declaration of ‘QPushButton’ with no type
    calculPlus.h:45: erreur: expected ‘;’ before ‘*’ token
    calculPlus.h:47: erreur: expected `:' before ‘slots’
    calculPlus.h:48: erreur: expected primary-expression before ‘void’
    calculPlus.h:48: erreur: ISO C++ forbids declaration of ‘slots’ with no type
    calculPlus.h:48: erreur: expected ‘;’ before ‘void’
    appliPlus.cpp: In function ‘int main(int, char**)’:
    appliPlus.cpp:4: erreur: ‘QApplication’ was not declared in this scope
    appliPlus.cpp:4: erreur: expected `;' before ‘app’
    appliPlus.cpp:6: erreur: ‘class Calculatrice’ has no member named ‘show’
    appliPlus.cpp:7: erreur: ‘app’ was not declared in this scope
    appliPlus.cpp: At global scope:
    appliPlus.cpp:3: attention : unused parameter ‘argc’
    appliPlus.cpp:3: attention : unused parameter ‘argv’
    make: *** [appliPlus.o] Erreur 1

  2. #2
    yan
    yan est déconnecté
    Rédacteur
    Avatar de yan
    Homme Profil pro
    Ingénieur expert
    Inscrit en
    Mars 2004
    Messages
    10 035
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Ingénieur expert
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2004
    Messages : 10 035
    Par défaut
    Salut et bienvenu sur le forum
    Essaye d'utiliser qmake-qt4.
    Sur certain distrib qt3 et qt4 sont installés et qmake par défaut est celui de qt3.

  3. #3
    Membre éprouvé Avatar de krieg
    Profil pro
    Inscrit en
    Janvier 2009
    Messages
    75
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France

    Informations forums :
    Inscription : Janvier 2009
    Messages : 75
    Par défaut
    Salut,
    regarde voir où est situé le fichier ou dossier QApplication.
    et ajoute à la compilation un -I 'le dossier contenant QApplication'.
    je ne suis pas sur que cela suffise ou regle ton probleme mais tu peux
    tenter.(car il ne trouve pas le dossier ou le fichier QApplication)

    bye et bonne chance.

  4. #4
    Membre averti
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 23
    Par défaut
    la commande qmake-qt4 n'existe pas( uniquement qmake) et puis en lancant la commande make -I "/usr/lib/qt4/include/Qt/qapplication.h", j'ai toujours les memes erreurs,j'ai du indiquer le mauvais chemin !
    En tout cas, merci d'avoir repondu si rapidement

  5. #5
    Membre éprouvé Avatar de krieg
    Profil pro
    Inscrit en
    Janvier 2009
    Messages
    75
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France

    Informations forums :
    Inscription : Janvier 2009
    Messages : 75
    Par défaut
    salut, va dans le dossier et lance :

    g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/usr/lib/qt3/mkspecs/linux-g++ -I. -I. -I/usr/share/qt//include -I/usr/lib/qt4/include/Qt/ -o appliPlus.o appliPlus.cpp

    Je pense que cela devrai fonctionner.
    bye,

  6. #6
    Membre averti
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 23
    Par défaut
    avec cette commande, j'ai les memes erreurs

  7. #7
    Membre très actif
    Avatar de FloMo
    Homme Profil pro
    Freelance iOS
    Inscrit en
    Juillet 2004
    Messages
    726
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France, Deux Sèvres (Poitou Charente)

    Informations professionnelles :
    Activité : Freelance iOS
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juillet 2004
    Messages : 726
    Par défaut
    Vérifie que tu as bien installé le package correspondant à qt4. En effet, qt3 fournit aussi qmake & co. Ils sont appelés qmake-qt3 et qmake-qt4.

    qmake est généralement un lien vers l'un ou l'autre selon les préférences système.

  8. #8
    Membre Expert

    Avatar de IrmatDen
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    1 727
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 1 727
    Par défaut
    Comme l'ont dit Mongaulois et FloMo, tu compiles avec Qt 3 là. Si qmake-qt4 n'existe pas comme tu le dis, à toi de faire un faire un alias sur le qmake qui est celui de Qt 4.

    Edit: en cas de doute sur la version d'un qmake, il te suffit de lancer qmake -v pour voir à quelle version il correspond.

  9. #9
    Membre averti
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 23
    Par défaut
    C'est bon j'ai installé la version 2009 et qt4 est deja préinstallé dessus, donc ca fonctionne merci encore

Discussions similaires

  1. probleme avec make
    Par KateA dans le forum Débuter
    Réponses: 13
    Dernier message: 02/02/2010, 13h56
  2. Probleme de make avec uClinux
    Par DrTank dans le forum Linux
    Réponses: 4
    Dernier message: 26/01/2008, 20h51
  3. Probleme avec Make -->[all-recursive] Erreur 1
    Par lolodelp dans le forum Installation
    Réponses: 3
    Dernier message: 18/04/2006, 23h41
  4. Problème avec la commande MAKE
    Par julio26 dans le forum Shell et commandes GNU
    Réponses: 6
    Dernier message: 30/04/2005, 20h48
  5. Problème avec make menuconfig
    Par Kehel dans le forum Linux
    Réponses: 5
    Dernier message: 05/03/2004, 08h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo