Skip to content

Support Windows x64/x86/arm64 vcpkg for 1DS C++ SDK (mstelemetry) #781

Description

Before opening a feature request against this repo, consider whether the feature is generic enough for the SDK, or it should be a specific plugin/extension to the SDK.

Is your feature request related to a problem?
Currently 1DS C++ SDK only supports to build with Mac and Linux using vcpkg.

Describe the solution you'd like.
What do you want to happen instead? What is the expected behavior?
Add support to build 1DS C++ SDK for Windows x64/x86/arm64 using vcpkg.

Describe alternatives you've considered.
Which alternative solutions or features have you considered?

Additional context.
Add any other context about the feature request here.
We are trying to add 1DS C++ SDK to our project as a dependency. We are targeting builds on Windows x64/x86/arm64.

Activity

  1. maxgolov commented on Feb 10, 2021

    @maxgolov
    Contributor

    This is partially supported, but we have not yet fully tested and not yet pushed the control file to vcpkg repo.

    Please try out some instructions here.

    These instructions were tested on Linux:
    https://github.com/microsoft/cpp_client_telemetry/blob/master/docs/building-with-vcpkg.md

    I have not yet fully tested on Windows.

  2. lulululululu commented on Feb 10, 2021

    @lulululululu
    Author

    Hi Max,
    I tested on Windows by cloning the repo and ran vcpkg install --head --overlay-ports=pwd/tools/ports mstelemetry. Got BUILD_FAILED. Checking log files, it's caused by:

    tsrc/sqlite3.h(35): fatal error C1083: Cannot open include file: 'stdarg.h': No such file or directory [C:\Repos\cpp_client_telemetry\sqlite\sqlite.vcxproj].

    Looks like portfile.cmake is just calling build-all.bat. So I tried running this script myself and got the same error. Looking into this script, seems like it's trying to build four flavors: /MD, /MT, ARM, ARM64. I temporarily disabled /MD, ARM, ARM64 and build succeeded.

    So looks like it's missing some logic to detect the build machine architecture? Also is it missing a step to copy the build output to a destination folder?

  3. maxgolov commented on Feb 11, 2021

    @maxgolov
    Contributor

    The script right now builds once for all architectures, it does not intake the vcpkg-provided architcture.

    I think you can assume that the build scripts for your scenario are created by you. So feel free to add an option to toggle the ARM off. If you need ARM/ARM64, your Visual Studio installation is probably missing these bits. Thus, the failure. If you install the optional ARM/ARM64 support, the build should succeed for all platforms at once. Or create your local build-my-sdk.bat in your workspace as a workaround for now to test. These are the instructions on how to add the corresponding headers and toolchains: https://blogs.windows.com/windowsdeveloper/2018/11/15/official-support-for-windows-10-on-arm-development/ - this is for vs2017, but the process is identical for vs2019.

    I'll take a look at the second part that is not copying the build output from .\Solution\out\ directory to vcpkg directory. This is currently missing for Windows. I'll fix this.

  4. lulululululu commented on Feb 11, 2021

    @lulululululu
    Author

    Thanks for your reply!

    Just to clarify, I don't have my own build script. Just directly running build-all.bat for debugging purpose.

    Are you saying the portfile will always build for all Windows architectures? If so, will all four build outputs be copied to vcpkg directory? In that case, will it cause an issue for user of the 1DS C++ SDK? Our project also needs to have as small of footprint as possible because it will run on edge.

    Or. are you only copying one based on the system architecture?
    If so, shouldn't it be more efficient to just detect the system architecture and only generate one build output?

    Also, you mentioned you will add code for copying. Do you have an estimate on how long that will take?

    Thank you!

  5. maxgolov commented on Feb 11, 2021

    @maxgolov
    Contributor

    We will add both - platform and architecture detection, and a triplet detection. -static would be for /MT and the regular is gonna be for /MD. Right now the port file simply kicks-off the full build on Windows, whereas on Linux it should only build for the current architecture (not yet supporting cross-compiling for different bitness or architecture).

    If you know how to solve this, feel free to contribute a PR. I can take a look at that within the next 2-3 weeks.

  6. maxgolov commented on May 20, 2021

    @maxgolov
    Contributor

    Youyou Han (@lulululululu) - please try the port file from #810

  7. self-assigned this
    on Jun 11, 2026
  8. bmehta001 commented on Jun 11, 2026

    @bmehta001
    Contributor

    I have submitted an official vcpkg port for all supported triplets after merging #1466, so I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

build infraBuild, test and CIhelp wantedExtra attention is needediOSiOS related issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions