Bug #8022
closedWt failed due to "error C2872: 'local_time': ambiguous symbol" under /std:c++latest + MSVC
100%
Description
Hello,
Wt failed due to "error C2872: 'local_time': ambiguous symbol" under /std:c++latest- mode when built on MSVC. Could you please help take a look at this? Thanks in advance!
Note:
Wt requires boost. You can get boost 32bits and 64bits from following address and Change the install path:
32bits: c:\boost_1_67_0\x86
64bits: c:\boost_1_67_0\x64
Boost: https://sourceforge.net/projects/boost/files/boost-binaries/1.67.0/
Repro steps:
1. Open VS2019 x64 Native tools command tool
2. git clone https://github.com/emweb/wt F:\Wt\src
3. cd F:\Wt
4. mkdir build && pushd build
5. cmake -G "Visual Studio 16 2019" -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DBOOST_PREFIX=C:\boost_1_67_0\x64 -
DBOOST_LIBRARYDIR=C:\boost_1_67_0\x64\lib64-msvc-14.1 ..\src\
6. msbuild /m /p:Platform=x64 /p:Configuration=Release ALL_BUILD.vcxproj /t:Rebuild
Actual result:
F:\gitP\emweb\wt\src\Wt\WLocalDateTime.C(63,1): error C2872: 'local_time': ambiguous symbol
F:\gitP\emweb\wt\src\Wt\WLocalDateTime.C(74,1): error C2872: 'sys_time': ambiguous symbol
Updated by Korneel Dumon almost 4 years ago
Hi,
Its seems c++20 introduced std::chrono::local_time which causes a namespace clash in our code but I cannot yet reproduce it with gcc 9.3.0 on ubuntu.
Updated by xiaoxiao xu almost 4 years ago
Hi,
Thanks for your response in time! We use Wt as a part of MSVC testing to detect regression. Recentlly we update on https://github.com/microsoft/STL/pull/323, the Wt source code will trigger the above error after the next MSVC is released.
Updated by xiaoxiao xu almost 4 years ago
xiaoxiao xu wrote in #note-2:
Hi,
Thanks for your response in time! We use Wt as a part of MSVC testing to detect regression. Recently we update on https://github.com/microsoft/STL/pull/323, the Wt source code will trigger the above error after the next MSVC is released.
Updated by Roel Standaert almost 4 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
- Target version set to 4.5.1
Updated by Roel Standaert almost 4 years ago
- Status changed from InProgress to Resolved
Updated by Roel Standaert about 3 years ago
- Status changed from Resolved to Closed