bonjour,
je veux utiliser Boost::serialization et je m'inspire directement des exemples de la doc.
Pour mon .h:
Mon .pro:
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 #include <boost/serialization/version.hpp> //#include <boost/serialization/serialization.hpp> //#include <boost/serialization/access.hpp> class C_ObjGraphic { private: friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int version) { } public: C_ObjGraphic(QColor); virtual ~C_ObjGraphic(); }; BOOST_CLASS_VERSION(C_ObjGraphic, 1)
A la compil, j'ai toujours l'erreur:
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 QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = tstBoostBis TEMPLATE = app DEFINES += BOOST_THREAD_USE_LIB SOURCES += main.cpp\ mainwindow.cpp \ c_objgraphic.cpp \ HEADERS += mainwindow.h \ c_objgraphic.h \ FORMS += mainwindow.ui INCLUDEPATH += C:/boost_1_52_0 LIBS += C:/boost_1_52_0/stage/lib/libboost_serialization-vc100-mt-gd-1_52.lib
'access' in namespace 'boost::serialization' does not name a type
friend declaration does not name a class or function
Ma déclaration d'amitié me semble correcte!
Une idée??
Merci.
Partager