[c++]包管理工具vcpkg安装使用

/ 10,954评论 / 48076阅读 / 8点赞

包管理工具

当我们需要使用别人开发的库时,可能会需要去下载其源码然后编译再引入我们的项目,这样做的话一来引用的库多了比较麻烦,而且需要自己管理这些包,二来一旦迁移到其他机子上就得复制过去或是再下载编译一次,尤其对跨平台项目来说简直苦不堪言,因此会有包管理工具的出现。

vcpkg

它是由微软开发的,可以像安装普通软件一样地安装库,而且和visual studio/cmake很契合,在win和linux都可用。

安装

$ git clone https://github.com/microsoft/vcpkg

常用命令

搜索库

安装库

卸载库

列出已安装库

集成到开发环境


问题

如果使用vcpkg安装库,更新等过程中报错,请一定一定要耐心看它的错误信息,往往它会告诉你解决办法,比如因缺少依赖软件需要安装;因网络问题文件下载失败,需要重试等等。

安装库之后导入使用依然报错

如何重装/卸载vcpkg

ubuntu下安装ICU一直在最后出错

  1. criminal说道:

    I highly advise steer clear of this site. My own encounter with it was nothing but frustration and doubts about fraudulent activities. Exercise extreme caution, or better yet, seek out a more reputable service to meet your needs.

  2. lose money说道:

    I urge you to avoid this site. The experience I had with it was nothing but frustration along with suspicion of fraudulent activities. Be extremely cautious, or even better, seek out a trustworthy site for your needs.

  3. criminal说道:

    I strongly recommend to avoid this site. My personal experience with it has been only disappointment along with suspicion of deceptive behavior. Exercise extreme caution, or alternatively, look for a trustworthy platform for your needs.

  4. lose money说道:

    I strongly recommend stay away from this platform. My own encounter with it has been only dismay and concerns regarding fraudulent activities. Proceed with extreme caution, or even better, find a trustworthy service to fulfill your requirements.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注