Category : archive

I am using Boost’s Archive library, and i have many "undefined reference" errors to functions in the archive namespace. C:/Users/Ethan/BoostFolder/boost_1_75_0/boost_1_75_0/boost/archive/detail/oserializer.hpp:92: undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()’ CMakeFilesBoostTest.dir/objects.a(CPlayGround.cpp.obj): In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::class_id_type>(boost::archive::text_oarchive&, boost::archive::class_id_type const&)’: This error appears only when i use an instance in the archive. int main() { text_oarchive a{std::cout}; } CMakeLists.txt: set(CMAKE_CXX_STANDARD 20) set(Boost_INCLUDE_DIR C:/Users/Ethan/BoostFolder/boost_1_75_0/boost_1_75_0) ..

Read more

I’m starting to learn libarchive for integrating it in one of my projects. In the first example that I can see it explains how to open an archive and list stored files: struct archive *a; struct archive_entry *entry; int r; a = archive_read_new(); archive_read_support_filter_all(a); archive_read_support_format_all(a); r = archive_read_open_filename(a, "archive.tar", 10240); // Note 1 if (r ..

Read more