I have a project which depends on cpprestsdk
, tinyxml2
. I run this project on another computer which has no internet connection, I installed these libraries with vcpkg, I was wondering should I statically link these libraries to my solution or use the new export command and create a nuget package and install it on my friend's computer.
Edit : I want to say that I don't need to run the generated .exe file, I want to take the whole visual studio solution.
If you want to take the whole VS solution over, the easiest way to get started is to export a NuGet package.
Later on, if you want to update the dependencies or install new ones, you can always transition to a full Vcpkg instance by removing the NuGet package from the solution.
In 2021 it seems like the best way to do this is to use vcpkg manifests . Here's an example vcpkg.json:
{
"name": "myproject",
"version-string": "0.0.1",
"dependencies": [
"cpprestsdk",
"tinyxml2"
]
}
I would just place the vcpkg.json next to the .sln and enable vcpkg manifests. I believe other users of the project have to install vcpkg themselves still, but maybe msbuild can bootstrap it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.