Serialization support is missing after build

Forum for posting problems using QxOrm library

Serialization support is missing after build

Postby gianks » Mon Jul 04, 2016 1:28 pm

Hi all,
i've built QxOrm enabling almost everything but i'm still trying to compile the quick tutorial example without success.
I'm obtaining this output now:
Code: Select all
main.cpp:56:23: error: ‘qx::serialization::xml’ has not been declared
    qx::serialization::xml::to_file(lst_drug, "./export_drugs.xml");
                       ^
main.cpp:60:23: error: ‘qx::serialization::xml’ has not been declared
    qx::serialization::xml::from_file(lst_drug_tmp, "./export_drugs.xml");


Seems that the build is missing the XML serialization support even if the QxOrm.pri states the opposite.

If i comment out the two lines actually requiring qx::serialization::xml the compilation fails anyway reporting this:
Code: Select all
g++ -m64 -o dist/Debug/GNU-Linux/test_orm build/Debug/GNU-Linux/drug.o build/Debug/GNU-Linux/main.o   -L/usr/X11R6/lib64 -lQxOrm -lboost_serialization -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Sql -lQt5Core -lGL -lpthread
build/Debug/GNU-Linux/main.o: nella funzione "QByteArray qx::serialization::qt::to_byte_array<drug>(drug const&, void*, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:69: riferimento non definito a "operator<<(QDataStream&, drug const&)"
build/Debug/GNU-Linux/main.o: nella funzione "qx::QxBool qx::serialization::qt::from_byte_array<drug>(drug&, QByteArray const&, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:85: riferimento non definito a "operator>>(QDataStream&, drug&)"
collect2: error: ld returned 1 exit status


Can someone give me a hint please?

I've also tried building the tests but i'm getting a lot of linking errors since libboost_serialize seems to be not linked...
Code: Select all
...
...
release/main.o:(.data.rel.ro._ZTVN5boost13serialization6detail17singleton_wrapperINS0_25extended_type_info_typeidISt4pairINS_6tuples5tupleI7QStringlS7_NS5_9null_typeES8_S8_S8_S8_S8_S8_EENS_10shared_ptrI6authorEEEEEEE[_ZTVN5boost13serialization6detail17singleton_wrapperINS0_25extended_type_info_typeidISt4pairINS_6tuples5tupleI7QStringlS7_NS5_9null_typeES8_S8_S8_S8_S8_S8_EENS_10shared_ptrI6authorEEEEEEE]+0x18): riferimento non definito a "boost::serialization::typeid_system::extended_type_info_typeid_0::is_equal(boost::serialization::extended_type_info const&) const"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::save(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "typeinfo for boost::archive::detail::basic_iarchive"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::xml_iarchive_impl<boost::archive::xml_iarchive>::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_iarchive<boost::archive::xml_iarchive>::load_override(boost::archive::version_type&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_id_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_name_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_optional_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_reference_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_iarchive<boost::archive::xml_iarchive>::load_override(boost::archive::tracking_type&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_iarchive<boost::archive::xml_iarchive>::load_override(boost::archive::object_id_type&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::detail::archive_serializer_map<boost::archive::xml_iarchive>::find(boost::serialization::extended_type_info const&)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::tracking_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_reference_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::version_type const&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "typeinfo for boost::archive::detail::basic_oarchive"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::basic_xml_iarchive<boost::archive::xml_iarchive>::load_override(boost::archive::class_id_type&, int)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::detail::archive_serializer_map<boost::archive::binary_iarchive>::find(boost::serialization::extended_type_info const&)"
//usr/local/lib/libQxOrm.so: riferimento non definito a "boost::archive::xml_iarchive_impl<boost::archive::xml_iarchive>::load_override(boost::archive::class_name_type&, int)"
collect2: error: ld returned 1 exit status
Makefile.Release:159: set di istruzioni per l'obiettivo "../../../QxOrm/test/_bin/qxBlogCompositeKey" non riuscito


Thanks
Gianluca
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Serialization support is missing after build

Postby qxorm » Mon Jul 04, 2016 4:28 pm

Hello,

I'm able to build QxOrm and all samples with and without boost serialization : so there is a problem on your environment.
You need to first change the QxOrm.pri configuration file, then build QxOrm library, then build your projects (or projects samples provided by QxOrm package).
I would recommend to clean all your project (or better : remove QxOrm directory, then unzip it again).

And are you sure that your boost serialization binary has been built correctly ?
You can go to the tutorial here for more details : http://www.qxorm.com/qxorm_en/tutorial_3.html#tuto_30

Note : boost serialization is optional, do you really need it ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Serialization support is missing after build

Postby gianks » Wed Jul 06, 2016 12:39 pm

Hi, you are right, NetBeans is probably buggy somehow and i've to manually recall qmake from cli on the .pro generated by netbeans since it seems to not regenerate the makefile even on a full clean&build, so any change on the QxOrm.pri is not applied after the first include!

Thanks
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Serialization support is missing after build

Postby qxorm » Wed Jul 06, 2016 1:59 pm

Great !
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 11 guests