#1 Le 30/04/2013, à 18:31
- Kakoum
Reprise d'un projet Qt sous sous un autre environnement.
Salutation à tous,
Je suis en BTS IRIS et je travaille aux labos (en classe) sur un projet QtCreator, lors de ces vacances j'ai voulu continuer le projet sur mon ordinateur personnel qui est sous Ubuntu (les ordis du BTS sont sous Mandriva). J'ai donc copier les fichiers de mon projet Qt de mandriva sur mon ordi sous Ubuntu, et lors de la compilation sous QtCreator il m'affiche ce message :
"Erreur à la compilation du projet icommercial (cible : Bureau)
Lors de l'exécution de l'étape "qmake" "
Je comprend bien que c'est dû au fait que j'ai changé d’environnement de travail, mais ma question est : est-il possible de réparer cela pour continuer mon travail sur mon ordinateur personnel ?
J'ai essayé de moi même et cherché des solutions sur le net avant de poster mais en vain bien que cette erreur apparaisse sur le net, la solution, elle, n'est pas aussi fréquente.
Merci de m'aider !
Hors ligne
#2 Le 01/05/2013, à 07:08
- elendil
Re : Reprise d'un projet Qt sous sous un autre environnement.
Juste en passant :
- Tu n'as que ces lignes dans ton terminal lors de la compilation ? Si c'est pas le cas, poste tout ce qu'il y a.
- qmake est-il installé sur ton pc ? le nom du paquet est qt4-qmake (il me semble).
Hors ligne
#3 Le 02/05/2013, à 18:35
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Yop
Je n'ai que ces lignes oui, je peux tester en compilant à partir d'un "make" depuis un terminal sinon ? (y'aura plus de détail)
Comment je vois si il est installé ?
Hors ligne
#4 Le 02/05/2013, à 18:46
- elendil
Re : Reprise d'un projet Qt sous sous un autre environnement.
Je n'ai que ces lignes oui, je peux tester en compilant à partir d'un "make" depuis un terminal sinon ? (y'aura plus de détail)
QTCreator semble être un IDE du coup je ne sais pas trop comment il gère la compilation...
Faire un make sans makefile ça ne sert à rien du coup je ne sais pas si ce sera utile. Dans tous les cas tu peux tenter et s'il te dit qu'il n'y a pas de makefile c'est qe QTCreator gère ça différemment.
Je n'ai pas jamais fait de Qt et n'utilise pas d'IDE.... du coup je ne pourrais pas beaucoup t'aider....
Comment je vois si il est installé ?
dpkg -l NOM DU PAQUET
soit :
dpkg -l qt4-qmake
Hors ligne
#5 Le 02/05/2013, à 19:08
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Yop lorsque je fais la commande, ça me met ça :
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Description
+++-==============-==============-============================================
ii qt4-qmake 4:4.8.1-0ubunt Qt 4 qmake Makefile generator tool
comment le réinstaller ?
Hors ligne
#6 Le 02/05/2013, à 19:50
- tiramiseb
Re : Reprise d'un projet Qt sous sous un autre environnement.
Il est installé, pas besoin de le réinstaller.
Le programme qmake, lors de l'exécution de la compilation, a certainement une erreur.
Le mieux est de compiler en ligne de commande pour avoir tous les retours.
Par contre je ne sais pas quelle est la commande à utiliser pour ça, je n'ai jamais compilé de programme en Qt et je ne sais pas comment est fait ton projet.
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne
#7 Le 02/05/2013, à 19:51
- elendil
Re : Reprise d'un projet Qt sous sous un autre environnement.
ii qt4-qmake 4:4.8.1-0ubunt Qt 4 qmake Makefile generator tool
comment le réinstaller ?
Il est bien installé .
Bon ben du coup je ne sais pas quoi te dire....
Hors ligne
#8 Le 02/05/2013, à 19:54
- tiramiseb
Re : Reprise d'un projet Qt sous sous un autre environnement.
Kakoum: peux-tu nous montrer la liste des fichiers contenus dans le répertoire racine de ton projet ?
(résultat de la commande « ls -1 »)
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne
#9 Le 07/05/2013, à 06:22
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Désolé de répondre un peu en retard. Voici la commande ls -1 :
addbp.cpp
addbp.h
addbp.o
addbp.ui
addlot.cpp
addlot.h
addlot.o
addlot.ui
icommercial
icommercial.pro
icommercial.pro.user
icommercial.pro.user.2.2pre5
main.cpp
main.o
mainwindow.cpp
mainwindow.h
mainwindow.o
mainwindow.ui
Makefile
moc_addbp.cpp
moc_addbp.o
moc_addlot.cpp
moc_addlot.o
moc_mainwindow.cpp
moc_mainwindow.o
ui_addbp.h
ui_addlot.h
ui_mainwindow.h
Hors ligne
#10 Le 07/05/2013, à 06:32
- tiramiseb
Re : Reprise d'un projet Qt sous sous un autre environnement.
Et si tu exécutes simplement la commande suivante, dans ton répertoire ? (comme tu l'as, en fait, proposé en #3 )
make
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne
#11 Le 07/05/2013, à 07:30
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Si je fais ça, le terminal me répond :
make: Rien à faire pour « first ».
Si je le supprime, que je fais un
qmake
la commande s’exécute, je refais ensuite un
make
et toujours la même répons que précédemment.. (je test des choses hein ).
Dernière modification par Kakoum (Le 07/05/2013, à 07:31)
Hors ligne
#12 Le 07/05/2013, à 07:31
- tiramiseb
Re : Reprise d'un projet Qt sous sous un autre environnement.
Quel est le contenu du fichier Makefile ?
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne
#13 Le 07/05/2013, à 07:41
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Ok donc si j’exécute le programme directement depuis un terminal, si je fais
./nomDuProg
il s’exécute bien !!
Donc le problème vient directement de QtCréator qui lui ne veut pas exécuter mon programme...
Je peux donc continuer de bosser (je m'abstiendrais d'utiliser le compilateur de Qt).
Voici le MakeFile au cas où une erreur m’empêcherait d'utiliser le compilateur de QtCreator, faites le moi savoir.
#############################################################################
# Makefile for building: icommercial
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue May 7 08:36:22 2013
# Project: icommercial.pro
# Template: app
# Command: /usr/bin/qmake -o Makefile icommercial.pro
#################################################################################### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = addbp.cpp \
addlot.cpp \
main.cpp \
mainwindow.cpp moc_addbp.cpp \
moc_addlot.cpp \
moc_mainwindow.cpp
OBJECTS = addbp.o \
addlot.o \
main.o \
mainwindow.o \
moc_addbp.o \
moc_addlot.o \
moc_mainwindow.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
icommercial.pro
QMAKE_TARGET = icommercial
DESTDIR =
TARGET = icommercialfirst: all
####### Implicit rules.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<".c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"####### Build rules
all: Makefile $(TARGET)
$(TARGET): ui_addbp.h ui_addlot.h ui_mainwindow.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)Makefile: icommercial.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/i386-linux-gnu/libQtGui.prl \
/usr/lib/i386-linux-gnu/libQtCore.prl
$(QMAKE) -o Makefile icommercial.pro
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/common/gcc-base.conf:
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
/usr/share/qt4/mkspecs/common/g++-base.conf:
/usr/share/qt4/mkspecs/common/g++-unix.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/i386-linux-gnu/libQtGui.prl:
/usr/lib/i386-linux-gnu/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile icommercial.prodist:
@$(CHK_DIR_EXISTS) .tmp/icommercial1.0.0 || $(MKDIR) .tmp/icommercial1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/icommercial1.0.0/ && $(COPY_FILE) --parents addbp.h addlot.h mainwindow.h .tmp/icommercial1.0.0/ && $(COPY_FILE) --parents addbp.cpp addlot.cpp main.cpp mainwindow.cpp .tmp/icommercial1.0.0/ && $(COPY_FILE) --parents addbp.ui addlot.ui mainwindow.ui .tmp/icommercial1.0.0/ && (cd `dirname .tmp/icommercial1.0.0` && $(TAR) icommercial1.0.0.tar icommercial1.0.0 && $(COMPRESS) icommercial1.0.0.tar) && $(MOVE) `dirname .tmp/icommercial1.0.0`/icommercial1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/icommercial1.0.0clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefilecheck: first
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all: moc_addbp.cpp moc_addlot.cpp moc_mainwindow.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_addbp.cpp moc_addlot.cpp moc_mainwindow.cpp
moc_addbp.cpp: addbp.h
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) addbp.h -o moc_addbp.cppmoc_addlot.cpp: addlot.h
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) addlot.h -o moc_addlot.cppmoc_mainwindow.cpp: mainwindow.h
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cppcompiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_addbp.h ui_addlot.h ui_mainwindow.h
compiler_uic_clean:
-$(DEL_FILE) ui_addbp.h ui_addlot.h ui_mainwindow.h
ui_addbp.h: addbp.ui
/usr/bin/uic-qt4 addbp.ui -o ui_addbp.hui_addlot.h: addlot.ui
/usr/bin/uic-qt4 addlot.ui -o ui_addlot.hui_mainwindow.h: mainwindow.ui
/usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.hcompiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean####### Compile
addbp.o: addbp.cpp addbp.h \
ui_addbp.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o addbp.o addbp.cppaddlot.o: addlot.cpp addlot.h \
ui_addlot.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o addlot.o addlot.cppmain.o: main.cpp mainwindow.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cppmainwindow.o: mainwindow.cpp mainwindow.h \
ui_mainwindow.h \
addlot.h \
addbp.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cppmoc_addbp.o: moc_addbp.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_addbp.o moc_addbp.cppmoc_addlot.o: moc_addlot.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_addlot.o moc_addlot.cppmoc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp####### Install
install: FORCE
uninstall: FORCE
FORCE:
Sur-ce je vous remercie vraiment à tous pour vos réponses !
Cordialement,
Kakoum
Dernière modification par Kakoum (Le 07/05/2013, à 07:43)
Hors ligne
#14 Le 07/05/2013, à 07:44
- tiramiseb
Re : Reprise d'un projet Qt sous sous un autre environnement.
Il dit peut-être "rien à faire" car tout est déjà compilé :
Essaie les choses suivantes :
make clean
make
PS : les fichiers aussi, il faut les mettre dans des balises "[ code ]". Les balises "[ quote ]", c'est quand tu cites un autre message, une autre personne.
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne
#15 Le 07/05/2013, à 07:56
- Kakoum
Re : Reprise d'un projet Qt sous sous un autre environnement.
Ok j'ai fais les deux commandes, nickel, elles s’exécutent correctement.
Mais ça m'affiche toujours :
Erreur à la compilation du projet icommercial (cible : Bureau)
Lors de l'exécution de l'étape "qmake"
Bon je vais chercher un peu dans le logiciel QtCreator, sinon tant pis je compile et exécute à partir du terminal.
(Ok pour les balises)
Dernière modification par Kakoum (Le 07/05/2013, à 07:57)
Hors ligne