Thanks to visit codestin.com
Credit goes to github.com

Skip to content

C2589 and C3861 occurred during building x86-windows #555

Closed
@MonicaLiu0311

Description

@MonicaLiu0311

Two errors occurred when building for x86-windows as follows:

  1. Macros about min and max:
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(128): error C2589: '(': illegal token on right side of '::'
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(128): error C2062: type 'unknown-type' unexpected
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(128): error C2789: 'SafeAny::SimpleString::CAPACITY': an object of const-qualified type must be initialized
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(128): error C2059: syntax error: ')'
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(136): error C2131: expression did not evaluate to a constant
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp\utils\simple_string.hpp(157): error C3863: array type 'char [CAPACITY]' is not assignable
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp/utils/convert_impl.hpp(68): error C2760: syntax error: '(' was unexpected here; expected ')'
 E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\include\behaviortree_cpp/utils/convert_impl.hpp(68): error C3878: syntax error: unexpected token '(' following 'expression'
  1. Use of functions _BitScanForwar and _BitScanForward64:
E:\vcpkg01\buildtrees\behaviortree-cpp\src\haviorTree-00e1cfa921.clean\3rdparty\lexy\include\lexy/_detail/swar.hpp(144): error C3861: '_BitScanForward64': identifier not found

Reproduce environment:

  • Win 10
  • VS 2022

Related PR: microsoft/vcpkg#31287

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions