Danny
Danny

Reputation: 780

Visual Studio does not recognize libraries installed with vcpkg but still compiles the solution successfully

I set up vcpkg in my Visual C++ project in order to avoid having to manually add the include path for each dependency. However, Visual Studio does not recognize the libraries and shows red lines under the relevant code, even after I run vcpkg install to install the libraries. Despite this, the solution compiles without issues, and the errors do disappear if I unload and reload the project (or restart Visual Studio).

I saw another question that describes a similar issue. Several answers say this is caused by ReSharper, but I definitely do not have that extension installed.

I also found a post on Microsoft Developer Community that says the issue was fixed in December 2019, but this does not appear to be the case for me.

Is there anything I could do to resolve this?

vcpkg.json contents:

{
  "dependencies": [
    "opencl"
  ]
}

vcpkg-configuration.json contents:

{
  "default-registry": {
    "kind": "git",
    "repository": "https://github.com/microsoft/vcpkg",
    "baseline": "cd124b84feb0c02a24a2d90981e8358fdee0e077"
  },
  "registries": [
  ]
}

Upvotes: 0

Views: 114

Answers (0)

Related Questions