Skip to content

github/awesome-copilot / skills/vcpkg

Guide for setting up vcpkg in C++ projects, managing dependency versions, and cross-compiling. Covers manifest initialization, CMake and Visual Studio integration, classic-to-manifest migration, version pinning, baselines, overrides, triplets, and cross-compilation. Use when a user is working with vcpkg project setup, installation, version management, or cross-platform builds. For specialized tasks, additional references cover custom registries and overlay ports (references/registries.md), CI/CD and binary caching (references/ci.md), and troubleshooting and dependency lifecycle (references/troubleshooting.md).

FileKindSize
SKILL.mdskill md10.1 KB
references/ci.mdmarkdown4.2 KB
references/registries.mdmarkdown3.1 KB
references/troubleshooting.mdmarkdown3.4 KB

references/troubleshooting.md

View on GitHub
# vcpkg: Troubleshooting & Dependency Lifecycle

Reference for the `vcpkg` skill. Use this when a user encounters vcpkg build failures, package-not-found errors, needs to read build logs, or manages the dependency lifecycle (removing, changing features, replacing libraries, cleaning the cache).

## Reading vcpkg Build Logs

Build logs are stored at:
```
<vcpkg-root>/buildtrees/<port-name>/
```

Key log files:
- `config-<triplet>-out.log` — CMake configure output
- `build-<triplet>-<dbg|rel>-<out|err>.log` — common build logs
- `install-<triplet>-<dbg|rel>-<out|err>.log` — common install logs

Exact names vary by port and build helper; use the path vcpkg prints for the failing command.

When a build fails, vcpkg prints the path to the relevant log. Start with the `-err.log` file for the failing step.

---

## Resolving package-not-found After Install

If CMake says `Could not find a package configuration file provided by "X"`:

1. **Check toolchain file** — ensure `-DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake` is set
2. **Check triplet match** — the installed triplet must match your build architecture
3. **Check package name** — vcpkg port names may differ from CMake package names (e.g., port `nlohmann-json` → `find_package(nlohmann_json)`)
4. **Check installed list** — run `vcpkg list` to confirm the package is actually installed
5. **Clear CMake cache** — delete `CMakeCache.txt` and reconfigure

---

## Dependency Lifecycle

### Removing a Library

1. Remove it from `vcpkg.json` → `"dependencies"` array
2. Run `vcpkg install` to reconcile (manifest mode auto-removes unused packages)

In classic mode:
```console
vcpkg remove boost-regex
vcpkg remove boost-regex --recurse  # also removes dependents
```

### Changing Features on an Installed Library

Update the features in `vcpkg.json`:
```json
{
  "dependencies": [
    {
      "name": "curl",
      "features": ["ssl", "ssh"]
    }
  ]
}
```

Then run `vcpkg install` — vcpkg will detect the feature change and rebuild.

In classic mode, installing a feature only adds to the already installed feature set; omitted features are not removed. To remove a feature, uninstall `curl` and then reinstall it with the desired features. Account for dependent packages before using `--recurse`, because it removes them too.

### Replacing One Library with Another

1. Remove the old library from `vcpkg.json`
2. Add the new library to `vcpkg.json`
3. Run `vcpkg install` to reconcile
4. Update your source code: change `#include` directives, `find_package()` calls, and `target_link_libraries()` in CMakeLists.txt

### Cleaning the vcpkg Cache

```powershell
# Remove build trees
Remove-Item -Recurse -Force <vcpkg-root>\buildtrees

# Remove downloaded archives
Remove-Item -Recurse -Force <vcpkg-root>\downloads

# Remove installed packages (classic mode only)
Remove-Item -Recurse -Force <vcpkg-root>\installed

# Remove package build artifacts
Remove-Item -Recurse -Force <vcpkg-root>\packages

# In CLI manifest mode, remove the manifest-root install directory
Remove-Item -Recurse -Force .\vcpkg_installed

# With CMake integration, remove <build-directory>\vcpkg_installed (or VCPKG_INSTALLED_DIR)
```

```bash
rm -rf <vcpkg-root>/buildtrees
rm -rf <vcpkg-root>/downloads
rm -rf <vcpkg-root>/installed
rm -rf <vcpkg-root>/packages
# CLI manifest mode; with CMake integration, use <build-directory>/vcpkg_installed (or VCPKG_INSTALLED_DIR)
rm -rf ./vcpkg_installed
```
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall