Project

General

Profile

Actions

Bug #8022

closed

Wt failed due to "error C2872: 'local_time': ambiguous symbol" under /std:c++latest + MSVC

Added by xiaoxiao xu almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
02/03/2021
Due date:
% Done:

100%

Estimated time:

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

Actions #1

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.

Actions #2

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.

Actions #3

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.

Actions #4

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
Actions #5

Updated by Roel Standaert almost 4 years ago

  • Status changed from InProgress to Resolved
Actions #6

Updated by Roel Standaert over 3 years ago

  • % Done changed from 0 to 100
Actions #7

Updated by Roel Standaert about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF