Home > Software design >  How can I statically link my project dependencies using vcpkg with Visual Studio?
How can I statically link my project dependencies using vcpkg with Visual Studio?

Time:01-18

I've read some ways to do what I want but none of them worked and they end up using the same method.

I've tried vcxproject

My Visual Studio's verbosity level (from the solution mentioned): verbosity

Output of vcpkg list: vcpkglist

Type of Runtime Library used: runtimelib

I've found a sort of solution (issue from vcpkg's github) that said I should manually add Ws2_32.Lib, Wldap32.Lib and Crypt32.Lib but I don't know how to do that...

Thank you in advance!

CodePudding user response:

You need to set your lib directory under Configratuon Properties->VC Directories to vcpkg static lib directory. On top of that you need to then link the libs under the Configuration Properties->Linker or using pragma comment(lib,"libname")

  •  Tags:  
  • Related