Bonsoir,
Je parviens à compiler ce que génère QxEE, pour obtenir les librairies.
A la suite de quoi, j'ai:
dans le répertoire BaseAgri/QxBase/bin la librairie libBaseAgrid.so.1.0.0 (14.7 Mo)
dans le répertoire BaseAgri/QxModel/bin la librairie libBaseAgriModeld.so.1.0.0 (16.8 Mo)
et dans BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug
BaseAgri_main.model_view.gen.o oCulture.model_view.o
Makefile oParam.model_view.gen.o
moc_oBande.model_view.gen.cpp oParam.model_view.o
oBande.model_view.gen.o oStIntOb.model_view.gen.o
oBande.model_view.o oStIntOb.model_view.o
oCulture.model_view.gen.o
C'est à partir de là que je construis mon projet BaseAgri, en veillant à ne plus toucher
ni à ce qui a été généré ni a ce qui a été compilé dans QxBase, dans QxModel ou dans les fichiers
listés ci-dessus dans BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug
J'obtiens une compilation, mais pas le link.
Je crois avoir passé tous les tutoriels et videos que j'ai pu trouver, mais (ce doit être trivial)
je n'ai rien trouvé, au delà des compilations et générations des librairies, comment les utiliser
dans un projet. (je prends comme hypothèse que les classes à utiliser sont celles décrites dans
les o*.gen.h ...)
Pour le precompiled.h, j'ai du passer toutes les combinaisons possibles des différents .h générés.
Actuellement j'ai:
Pour les exports aussi.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef PRECOMPILED_H #define PRECOMPILED_H #include <QxOrm.h> #include "export.h" #include "QxBase/include/BaseAgri_export.gen.h" //#include "QxBase/custom/include/BaseAgri_precompiled_header.h" //#include "QxModel/include/BaseAgri_export.model_view.gen.h" //#include "QxModel/custom/include/BaseAgri_precompiled_header.model_view.h" #endif // PRECOMPILED_H
BaseAgri.pro est:
Que je mette en commentaire ou pas les "QxBase/include/o*.gen.h", j'obtiens le même résultat.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 #------------------------------------------------- # # Project created by QtCreator 2015-06-29T21:41:59 # #------------------------------------------------- QT += core gui sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = BaseAgri TEMPLATE = app CONFIG += C++11 CONFIG += precompile_header PRECOMPILED_HEADER = precompiled.h SOURCES += main.cpp\ # build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/moc_mainwindow.cpp \ mainwindow.cpp \ taccesdao.cpp \ bureaudelegate.cpp HEADERS += \ mainwindow.h \ # QxBase/include/oBande.gen.h \ # QxBase/include/oCulture.gen.h \ # QxBase/include/oParam.gen.h \ # QxBase/include/oStIntOb.gen.h \ taccesdao.h \ bureaudelegate.h INCLUDEPATH += ./../Libs/QxOrm/include/ FORMS += \ mainwindow.ui #LIBS += -L/home/cs/Bureau/AteliersLogiciels/Libs/QxOrm/lib -lQxOrmd -lboost_serialization LIBS += -lboost_serialization unix:!macx: LIBS += -L$$PWD/../Libs/QxOrm/lib/ -lQxOrmd INCLUDEPATH += $$PWD/../Libs/QxOrm/include DEPENDPATH += $$PWD/../Libs/QxOrm/include INCLUDEPATH += $$PWD/QxBase/include DEPENDPATH += $$PWD/QxBase/include INCLUDEPATH += $$PWD/QxModel/include DEPENDPATH += $$PWD/QxModel/include OTHER_FILES += \ Erreurs.txt \ Messages.txt
Cela peut provenir du fait que dans oParam.gen.h par exemple, sur le code
j'ai sur BASEAGRI_EXPORT un warning avec en popup "skip identifier BASEAGRI_EXPORT"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #ifndef _BASEAGRI_OPARAM_H_ #define _BASEAGRI_OPARAM_H_ class oStIntOb; class oCulture; class BASEAGRI_EXPORT oParam { QX_REGISTER_FRIEND_CLASS(oParam) public: typedef qx::QxCollection<long, boost::shared_ptr<oStIntOb> > type_list_of_oStIntOb; ...
et la ligne QX_REGISTER_FRIEND_CLASS(oParam) est soulignée en rouge (popup "expected a declaration")
... mais je ne vois pas la cause de cela.
Je suis:
- Nettoyer le projet "BaseAgri"
- Recompiler le projet "BaseAgri"
J'obtiens:
Je dois rater quelque chose de simple mais que je ne vois pas, et que je n'ai trouvé dans aucun document ou tutoriel.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 21:58:30: Exécution des étapes pour le projet BaseAgri... 21:58:30: Débute : "/usr/bin/make" clean rm -f moc_mainwindow.cpp moc_bureaudelegate.cpp rm -f ui_mainwindow.h rm -f main.o mainwindow.o taccesdao.o bureaudelegate.o moc_mainwindow.o moc_bureaudelegate.o rm -f BaseAgri.gch/c BaseAgri.gch/c++ rm -f *~ core *.core 21:58:30: Le processus "/usr/bin/make" s'est terminé normalement. 21:58:30: Configuration inchangée, étape qmake sautée. 21:58:30: Débute : "/usr/bin/make" /home/cs/Qt/5.3/gcc/bin/uic ../mainwindow.ui -o ui_mainwindow.h g++ -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -x c++-header -c ../precompiled.h -o BaseAgri.gch/c++ g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o main.o ../main.cpp g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../mainwindow.cpp g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o taccesdao.o ../taccesdao.cpp g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o bureaudelegate.o ../bureaudelegate.cpp /home/cs/Qt/5.3/gcc/bin/moc -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/cs/Qt/5.3/gcc/mkspecs/linux-g++ -I/home/cs/Bureau/AteliersLogiciels/BaseAgri -I/home/cs/Bureau/AteliersLogiciels/Libs/QxOrm/include -I/home/cs/Bureau/AteliersLogiciels/Libs/QxOrm/include -I/home/cs/Bureau/AteliersLogiciels/BaseAgri/QxBase/include -I/home/cs/Bureau/AteliersLogiciels/BaseAgri/QxModel/include -I/home/cs/Qt/5.3/gcc/include -I/home/cs/Qt/5.3/gcc/include/QtWidgets -I/home/cs/Qt/5.3/gcc/include/QtSql -I/home/cs/Qt/5.3/gcc/include/QtGui -I/home/cs/Qt/5.3/gcc/include/QtCore -I. ../mainwindow.h -o moc_mainwindow.cpp g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp /home/cs/Qt/5.3/gcc/bin/moc -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/cs/Qt/5.3/gcc/mkspecs/linux-g++ -I/home/cs/Bureau/AteliersLogiciels/BaseAgri -I/home/cs/Bureau/AteliersLogiciels/Libs/QxOrm/include -I/home/cs/Bureau/AteliersLogiciels/Libs/QxOrm/include -I/home/cs/Bureau/AteliersLogiciels/BaseAgri/QxBase/include -I/home/cs/Bureau/AteliersLogiciels/BaseAgri/QxModel/include -I/home/cs/Qt/5.3/gcc/include -I/home/cs/Qt/5.3/gcc/include/QtWidgets -I/home/cs/Qt/5.3/gcc/include/QtSql -I/home/cs/Qt/5.3/gcc/include/QtGui -I/home/cs/Qt/5.3/gcc/include/QtCore -I. ../bureaudelegate.h -o moc_bureaudelegate.cpp g++ -c -include BaseAgri -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc/mkspecs/linux-g++ -I../../BaseAgri -I../../Libs/QxOrm/include -I../../Libs/QxOrm/include -I../QxBase/include -I../QxModel/include -I../../../../Qt/5.3/gcc/include -I../../../../Qt/5.3/gcc/include/QtWidgets -I../../../../Qt/5.3/gcc/include/QtSql -I../../../../Qt/5.3/gcc/include/QtGui -I../../../../Qt/5.3/gcc/include/QtCore -I. -I. -I. -o moc_bureaudelegate.o moc_bureaudelegate.cpp g++ -Wl,-rpath,/home/cs/Qt/5.3/gcc -Wl,-rpath,/home/cs/Qt/5.3/gcc/lib -o BaseAgri main.o mainwindow.o taccesdao.o bureaudelegate.o moc_mainwindow.o moc_bureaudelegate.o -lboost_serialization -L/home/cs/Bureau/AteliersLogiciels/BaseAgri/../Libs/QxOrm/lib/ -lQxOrmd -L/home/cs/Qt/5.3/gcc/lib -lQt5Widgets -lQt5Sql -lQt5Gui -lQt5Core -lGL -lpthread mainwindow.o: In function `qx::QxModel<oParam>::init()': Makefile:202: recipe for target 'BaseAgri' failed /home/cs/Bureau/AteliersLogiciels/BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/../../Libs/QxOrm/include/QxModelView/QxModel.h:185: undefined reference to `qx::QxSingleton<qx::QxClass<oParam> >::getSingleton()' mainwindow.o: In function `qx::QxModel<oCulture>::init()': /home/cs/Bureau/AteliersLogiciels/BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/../../Libs/QxOrm/include/QxModelView/QxModel.h:185: undefined reference to `qx::QxSingleton<qx::QxClass<oCulture> >::getSingleton()' mainwindow.o: In function `qx::QxModel<oStIntOb>::init()': /home/cs/Bureau/AteliersLogiciels/BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/../../Libs/QxOrm/include/QxModelView/QxModel.h:185: undefined reference to `qx::QxSingleton<qx::QxClass<oStIntOb> >::getSingleton()' mainwindow.o: In function `qx::QxModel<oStIntOb>::insertRows(int, int, QModelIndex const&)': /home/cs/Bureau/AteliersLogiciels/BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/../../Libs/QxOrm/include/QxModelView/QxModel.h:267: undefined reference to `oStIntOb::oStIntOb()' mainwindow.o: In function `qx::QxModel<oStIntOb>::qxFetchById(QVariant const&, QStringList const&, QSqlDatabase*)': /home/cs/Bureau/AteliersLogiciels/BaseAgri/build-BaseAgri-Desktop_Qt_5_3_GCC_32bit-Debug/../../Libs/QxOrm/include/QxModelView/QxModel.h:308: undefined reference to `oStIntOb::oStIntOb()' ... ... sur toutes les fonctions
Normal si c'est trivial et évident pour tout le monde ...
Partager