J'essaie d'utiliser QtService à partir de QtSolution dans un projet Qt.Impossible de créer un projet qt à l'aide de qtservice
Je l'ai décompressé et courir: configure.bat -library qmake mingw32-make
le débogage et la libération dll ont été placés à l'intérieur C: \ Qt \ 2010.03 \ qt \ bin \ exemples ont été correctement construit.
J'ai ajouté cette ligne au bas de mon fichier .pro: comprennent (../ QtSolutions/qtservice/src/qtservice.pri)
et j'ai pu parcourir les sources du qtservice de la source du projet arbre.
Lorsque je tente de construire mon projet je reçois:
Running build steps for project EMCSolutionCrawler... Configuration unchanged, skipping QMake step. Starting: C:/Qt/2010.03/mingw/bin/mingw32-make.exe -w mingw32-make: Entering directory `C:/Progetti/EMCSolutionCrawler' c:\qt\2010.03\qt\bin\qmake.exe -spec ..\..\Qt\2010.03\qt\mkspecs\win32-g++ -win32 -o Makefile EMCSolutionCrawler.pro mingw32-make: Leaving directory `C:/Progetti/EMCSolutionCrawler' mingw32-make: Entering directory `C:/Progetti/EMCSolutionCrawler' C:/Qt/2010.03/mingw/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Progetti/EMCSolutionCrawler' g++ -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QTSERVICE_IMPORT -DQT_DLL -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT ../QtSolutions/qtservice/src/QtService.cpp -o ../QtSolutions/qtservice/src/QtService mingw32-make[1]: Leaving directory `C:/Progetti/EMCSolutionCrawler' mingw32-make: Leaving directory `C:/Progetti/EMCSolutionCrawler' In file included from ../QtSolutions/qtservice/src/QtService.cpp:47: ../QtSolutions/qtservice/src/qtservice.h:50:35: error: QtCore/QCoreApplication: No such file or directory In file included from ../QtSolutions/qtservice/src/QtService.cpp:48: ../QtSolutions/qtservice/src/qtservice_p.h:50:30: error: QtCore/QStringList: No such file or directory ../QtSolutions/qtservice/src/QtService.cpp:51:25: error: QtCore/QTimer: No such file or directory ../QtSolutions/qtservice/src/QtService.cpp:52:26: error: QtCore/QVector: No such file or directory ../QtSolutions/qtservice/src/QtService.cpp:53:27: error: QtCore/QProcess: No such file or directory ../QtSolutions/qtservice/src/QtService.cpp:426:25: error: qtservice.moc: No such file or directory In file included from ../QtSolutions/qtservice/src/QtService.cpp:47: ../QtSolutions/qtservice/src/qtservice.h:73: error: ISO C++ forbids declaration of 'Q_DECLARE_PRIVATE' with no type ../QtSolutions/qtservice/src/qtservice.h:74: error: expected ';' before 'public' ../QtSolutions/qtservice/src/qtservice.h:80: error: ISO C++ forbids declaration of 'QString' with no type ../QtSolutions/qtservice/src/qtservice.h:80: error: expected ',' or '...' before '&' token ../QtSolutions/qtservice/src/qtservice.h:86: error: 'QString' does not name a type ../QtSolutions/qtservice/src/qtservice.h:87: error: 'QString' does not name a type ../QtSolutions/qtservice/src/qtservice.h:88: error: 'StartupType' does not name a type ../QtSolutions/qtservice/src/qtservice.h:89: error: 'QString' does not name a type ../QtSolutions/qtservice/src/qtservice.h:91: error: ISO C++ forbids declaration of 'QString' with no type ../QtSolutions/qtservice/src/qtservice.h:91: error: expected ',' or '...' before '&' token ../QtSolutions/qtservice/src/qtservice.h:110: error: ISO C++ forbids declaration of 'Q_DECLARE_PRIVATE' with no type ../QtSolutions/qtservice/src/qtservice.h:111: error: expected ';' before 'public' ../QtSolutions/qtservice/src/qtservice.h:125: error: 'ServiceFlags' has not been declared ../QtSolutions/qtservice/src/qtservice.h:125: error: ISO C++ forbids declaration of 'Q_DECLARE_FLAGS' with no type ../QtSolutions/qtservice/src/qtservice.h:127: error: expected ';' before 'QtServiceBase' ../QtSolutions/qtservice/src/qtservice.h:130: error: 'QString' does not name a type ...
Qu'est-ce que je manque?
Environnement infomation: Qt 4.6.3 (MinGW - LGPL) Windows XP SP3 QtService 2.6
Merci pour votre temps.
le problème n'était pas dans le fichier .pro:
si je qmake et mingw32-font le projet qu'il construit sans erreurs. Les erreurs éclatent seulement si j'utilise QtCreator pour le construire. J'ai besoin d'un peu plus de temps pour étudier et résoudre ce problème mais je mettrai à jour mon post avec la solution. – MementoMoriOkay. Mais il y a maintenant des répertoires inclus pour votre appel g ++. Donc le compilateur ne peut pas trouver la déclaration de 'QtCore/QApplication' etc. – Lars