Skip to content

Compilation on newer windows SDKs. #3405

Open
@FrankXie05

Description

@FrankXie05

Describe the bug

I am the maintainer of vcpkg, and recently we found that some function names conflict with the names of latest sdks functions of windows.
eg:
NtQueryTimerResolution
_THREAD_NAME_INFORMATION
NtSetInformationThread

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

Windows 10
SDK version 10.0.22000.0

MsQuic version

main

Steps taken to reproduce bug

  1. git clone https://github.com/microsoft/vcpkg.git
  2. cd vcpkg
  3. ./bootstrap-vcpkg.bat
  4. ./vcpkg install ms-quic:x64-windows

Expected behavior

  1. Build successfully.
  2. When the function name can be renamed. Because I saw only the first two function names were modified before. Fix compilation on newer windows SDKs (1.0) (#1772) #1775
    Switch from NtQueryTimerResolution to GetSystemTimeAdjustment #1457

Actual outcome

C:\Users\evanc\Documents\git\vcpkg\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(564): error C2375: 'NtQueryTimerResolution': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winternl.h(713): note: see declaration of 'NtQueryTimerResolution'
C:\Users\evanc\Documents\git\vcpkg\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(765): error C2011: '_THREAD_NAME_INFORMATION': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winternl.h(352): note: see declaration of '_THREAD_NAME_INFORMATION'
C:\Users\evanc\Documents\git\vcpkg\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(773): error C2375: 'NtSetInformationThread': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winternl.h(659): note: see declaration of 'NtSetInformationThread'

Additional details

Related vcpkg issue: microsoft/vcpkg#29459

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions