Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing fmtd.dll from vcpkg/get_started/get-started.md helloworld #416

Open
intel-david opened this issue Oct 18, 2024 · 1 comment
Open

Comments

@intel-david
Copy link

intel-david commented Oct 18, 2024

Description

I followed the HelloWorld example on the "Getting Started" page, vcpkg/get_started/get-started.md, and the compiled binary produced an error message saying it couldn't find fmtd.dll.

Solution

I fixed this in two ways:

  1. Used target_link_libraries(main PRIVATE fmt::fmt-header-only) in the CMake preset.
  2. Used target_link_libraries(main PRIVATE fmt::fmt) in the CMake preset but typed vcpkg.exe integrate install before building the CMake project.

Hopefully I didn't miss a setup step, but I thought I'd report it in case the example needs some clarification.

Thank you.

@vicroms
Copy link
Member

vicroms commented Jan 31, 2025

I tried following the steps in the tutorial myself (followed the instructions for PowerShell) and couldn't reproduce the issue.

Used target_link_libraries(main PRIVATE fmt::fmt-header-only) in the CMake preset.
Used target_link_libraries(main PRIVATE fmt::fmt) in the CMake preset but typed vcpkg.exe integrate install before building the CMake project.

Do you mean CMakeLists.txt?

Your issue seems to be linking the DLL files, double check that:

  1. In CMakePresets.json, you are setting CMAKE_TOOLCHAIN_FILE with the value $env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake.
  2. In CMakeUserPresets.json, you set the value of VCPKG_ROOT to the actual path where vcpkg is installed, for example, to me that is C:\dev\vcpkg.

The vcpkg integrate install command should not have any effect on CMake projects, only on Visual Studio/MSBuild projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants