Opened 10 years ago
Closed 10 years ago
#6908 closed Bugs (fixed)
Compile error due to unprotected definitions of _WIN32_WINNT and WINVER
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | thread |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Boost.Thread, msvc, compile error, WINVER, _WIN32_WINNT, _WIN32_IE | Cc: |
Description
Environment: Visual Studio 9 on Windows 7 SP1 64-bit (compiling for 32-bit)
Boost versions: at least 1.47.0, up to trunk
libs/thread/src/win32/thread.cpp defines _WIN32_WINNT and WINVER outside of #ifndef/#endif, leading to a macro redefinition that results in a compile error when _WIN32_IE is set to something other than 0x0600. Specifically, this error prevents compiling Boost.Threads when defining WINVER=_WIN32_WINNT=0x0601 for Windows 7, with _WIN32_IE=0x0700.
Suggested solutions: Unless there is some technical reason for redefining them locally, these macros should either not be defined, or should be protected by #ifndef/#endif pairs.
Attachments (1)
Change History (4)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 10 years ago
Attachment: | thread.cpp.patch added |
---|
comment:2 by , 10 years ago
Milestone: | To Be Determined → Boost 1.51.0 |
---|
Committed in trunk at revision 78802.
comment:3 by , 10 years ago
Milestone: | Boost 1.51.0 → Boost 1.50.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Merged to release branch.
I don't know why this was defined. Please could you provide a working patch protecting the definition.