Category : archive

I am trying to create an archive using shutil.make_archive and it runs successfully on Linux but not on Windows. Here is the code: # archive_dir_path looks like this : old_outputs # execution_datetime looks like this : 2021-08-26 17:44:34.189488 # archived_output_path looks like this : old_outputsoutputs_2021-08-26 17:44:34.189488 archived_output_path = os.path.join(archive_dir_path, f’outputs_{execution_datetime}’) shutil.make_archive(archived_output_path, ‘zip’, output_dir_path) And here ..

Read more

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