Project

General

Profile

Bug #8022

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

Added by xiaoxiao xu 9 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
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

#1

Updated by Korneel Dumon 9 months 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.

#2

Updated by xiaoxiao xu 9 months 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.

#3

Updated by xiaoxiao xu 9 months 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.

#4

Updated by Roel Standaert 9 months ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version set to 4.5.1
#5

Updated by Roel Standaert 8 months ago

  • Status changed from InProgress to Resolved
#6

Updated by Roel Standaert 2 months ago

  • % Done changed from 0 to 100

Also available in: Atom PDF