Skip to content

[MSVC] DCTL failed to build due to error C2039 with msvc on Windows #25

@Zhaojun-Liu

Description

@Zhaojun-Liu

Hi,
We build dctl with msvc on Windows, it failed due to the below errors, it looks a regression issue from 06cd028, can you help look this issue? Thanks.

C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(21): error C2039: 'bit_set_fast': is not a member of 'xstd'
C:\gitP\rhalbersma\dctl\..\bit_set\include\xstd/bit_set.hpp(28): note: see declaration of 'xstd'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(21): note: the template instantiation context (the oldest one first) is
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(18): note: while compiling class template 'dctl::core::basic_mask'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(21): error C2061: syntax error: identifier 'bit_set_fast'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(22): error C2653: 'set_type': is not a class or namespace name
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(22): error C3861: 'max_size': identifier not found
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(22): error C2975: 'MaxValue': invalid template argument for 'boost::uint_value_t', expected compile-time constant expression
C:/gitP/Microsoft/vcpkg/installed/x64-windows/include\boost/integer.hpp(216): note: see declaration of 'MaxValue'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(25): error C3878: syntax error: unexpected token 'table' following 'expression'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(25): note: error recovery skipped: 'identifier'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(30): error C2059: syntax error: '('
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(35): error C2988: unrecognizable template declaration/definition
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(35): error C2143: syntax error: missing ',' before '<end Parse>'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(35): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(46): error C3861: 'set_type': identifier not found
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(57): error C2143: syntax error: missing ')' before ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(57): error C2988: unrecognizable template declaration/definition
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(57): error C2059: syntax error: ')'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(60): error C3861: 'set_type': identifier not found
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(76): error C2062: type 'void' unexpected
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(76): error C2238: unexpected token(s) preceding ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(76): error C2062: type 'void' unexpected
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(76): error C2238: unexpected token(s) preceding ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(77): error C2988: unrecognizable template declaration/definition
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(77): error C2059: syntax error: 'return'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(77): error C2238: unexpected token(s) preceding ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(80): error C2144: syntax error: 'auto' should be preceded by ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(25): error C2760: syntax error: 'table' was unexpected here; expected ';'
C:\gitP\rhalbersma\dctl\include\dctl/core/board/mask.hpp(30): error C2059: syntax error: ')'
......

More info:
the related repos and commit I used as follows:
dctl commit: de565a1
bit_set commit: c91bdd5
Tabula commit: ab6451c
Xstd commit: 4a1625d

Repro steps:

  1. Download the attachment divide.txt.
  2. Open VS2022 x64 Native Tools command.
  3. Run command: cl divide.txt /TP /c /EHsc /std:c++latest

Repro file:
divide.txt

By the way, I found that for the bit_set repository, all commits after commit c91bdd5 cause the git clone command to fail on Windows with the following error message:

......
Resolving deltas: 100% (2055/2055), done.
fatal: cannot create directory at 'include/aux': Invalid argument
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions