Closed danyhm closed 1 year ago
sorry this seems to be a problem with the portable_binary_iarchive
and portable_binary_oarchive
files which are not part of the standard boost serialization library. any idea how this can be fixed?
Just include the source files for portable by binary archive directly in your application.Robert Rameywww.rrsd.comOn Jan 30, 2023, at 1:52 AM, danyhm @.***> wrote: sorry this seems to be a problem with the portable_binary_iarchive and portable_binary_oarchive files which are not part of the standard boost serialization library. any idea how this can be fixed?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank for the reponse Robert!
I've already included the files in my project and it builds fine when using static libraries. However for dynamic libraries the compiler gives the errors mentioned above. I took a closer look and it seems the default boost library includes the correct macros for exported functions of the library but the portable_binary_archive files does not include those and some kind of redeclaration happens here. I'm not able to narrow the problem to which functions need them.
Looks like the errors issue from the vcpkg build of the library. I don't see how this would have anything to do with portable_binary_archive which is not part of the library. The library can be built with boost b2 and CMake. I've never tried to build the library with vcpkg build. You might try building the library with CMake and/or b2. Once built, the library should be linkable. But still the "visibility" feature could be a problem. It makes the binaries a lot smaller, but it's an add-on hack by the compiler vendors with inconsistent syntax between them. This is a little outside of boost. Open an issue with stack overflow and see if you get some useful information.
Hello,
I'm using boost serialization with vcpkg and I can build a project using static import in vcpkg configuration but I can't use it as a dynamic library. and I get the following errors:
linking boost as a static library is undesirable. is this a problem on my side or is this by design?