Opened 8 years ago

Closed 8 years ago

#10158 closed Bugs (fixed)

Boost.Log: Linker error with MSVC14

Reported by: marci_r@… Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: marci_r@…

Description

MSVC14 has a completely refactored CRT: http://blogs.msdn.com/b/vcblog/archive/2014/06/10/the-great-crt-refactoring.aspx

Trying to compile Boost.Log with it gives a linker error because there is no function _getptd (referenced in src\unhandled_exception_count.cpp).

The function is now called __vcrt_getptd. It returns a pointer to a new struct __vcrt_ptd. The part before _NLG_dwCode from the old struct _tiddata is missing, apart from that it looks the same.

See VC\crt\src\vcruntime\vcruntime_internal.h in the MSVC14 directory.

Change History (7)

comment:2 by Andrey Semashev, 8 years ago

Resolution: fixed
Status: newclosed

comment:3 by marci_r@…, 8 years ago

Wow, that was fast! Thank you very much!

comment:4 by garethsb@…, 8 years ago

Resolution: fixed
Status: closedreopened

As of Visual Studio 2015 CTP 6, the __vcrt_getptd symbol isn't exported, but Microsoft have introduced __processing_throw as a direct accessor for the required value, which we can hope will be maintained going forward.

comment:5 by Andrey Semashev, 8 years ago

Resolution: wontfix
Status: reopenedclosed

For whatever reason the latest MSVC CTP does not install half of the headers on my system and as a result is completely unusable. This looks worse than an alpha release to me. I'll probably not support CTPs and wait until the final release is out. If it's still not working then, I'll deal with it as the compiler gets officially supported by Boost.

comment:6 by Andrey Semashev, 8 years ago

Resolution: wontfix
Status: closedreopened

comment:7 by Andrey Semashev, 8 years ago

Resolution: fixed
Status: reopenedclosed

I tried to install MSVC on a clean system and it worked. Here is the fix: https://github.com/boostorg/log/commit/4751a165366dd9d1cf55252c290eaacf39a59552.

Note: See TracTickets for help on using tickets.