Opened 13 years ago

Closed 13 years ago

#3427 closed Bugs (fixed)

Serialization linker errors

Reported by: Hartmut Kaiser Owned by: Robert Ramey
Milestone: Boost 1.41.0 Component: serialization
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

The MS header file excpt.h has a

    #define exception_code _exception_code

which leads to problems if not consistently included.

The bottom line is, that archive_exception.cpp needs to be compiled with exactly the same windows headers included (excpt.h gets included by windows.h) as any sources including archive_exception.hpp, which is generally not possible to ensure.

The only fail-proof way I could see is to always have

    #if defined(BOOST_WINDOWS)
    #include <excpt.h>
    #endif

inside archive_exception.hpp, globally mapping exception_code to _exception_code. Patch attached.

Attachments (1)

archive_exception.hpp.diff (514 bytes ) - added by Hartmut Kaiser 13 years ago.

Download all attachments as: .zip

Change History (2)

by Hartmut Kaiser, 13 years ago

Attachment: archive_exception.hpp.diff added

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Status: newclosed

patch moved into trunk

Note: See TracTickets for help on using tickets.