# Vcpkg: Overview
[涓枃鎬昏](README_zh_CN.md)
[Espa帽ol](README_es.md)
[Fran莽ais](README_fr.md)
Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS.
This tool and ecosystem are constantly evolving, and we always appreciate contributions!
If you've never used vcpkg before, or if you're trying to figure out how to use vcpkg,
check out our [Getting Started](#getting-started) section for how to start using vcpkg.
For short description of available commands, once you've installed vcpkg,
you can run `vcpkg help`, or `vcpkg help [command]` for command-specific help.
* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), the #vcpkg channel
* Discord: [\#include \<C++\>](https://www.includecpp.org), the #馃審vcpkg channel
* Docs: [Documentation](docs/index.md)
[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master)
# Table of Contents
- [Vcpkg: Overview](#vcpkg-overview)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Quick Start: Windows](#quick-start-windows)
- [Quick Start: Unix](#quick-start-unix)
- [Installing Linux Developer Tools](#installing-linux-developer-tools)
- [Installing macOS Developer Tools](#installing-macos-developer-tools)
- [Installing GCC for macOS before 10.15](#installing-gcc-for-macos-before-1015)
- [Using vcpkg with CMake](#using-vcpkg-with-cmake)
- [Visual Studio Code with CMake Tools](#visual-studio-code-with-cmake-tools)
- [Vcpkg with Visual Studio CMake Projects](#vcpkg-with-visual-studio-cmake-projects)
- [Vcpkg with CLion](#vcpkg-with-clion)
- [Vcpkg as a Submodule](#vcpkg-as-a-submodule)
- [Tab-Completion/Auto-Completion](#tab-completionauto-completion)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
- [Telemetry](#telemetry)
# Getting Started
First, follow the quick start guide for either
[Windows](#quick-start-windows), or [macOS and Linux](#quick-start-unix),
depending on what you're using.
For more information, see [Installing and Using Packages][getting-started:using-a-package].
If a library you need is not present in the vcpkg catalog,
you can [open an issue on the GitHub repo][contributing:submit-issue]
where the vcpkg team and community can see it,
and potentially add the port to vcpkg.
After you've gotten vcpkg installed and working,
you may wish to add [tab completion](#tab-completionauto-completion) to your shell.
Finally, if you're interested in the future of vcpkg,
check out the [manifest][getting-started:manifest-spec] guide!
This is an experimental feature and will likely have bugs,
so try it out and [open all the issues][contributing:submit-issue]!
## Quick Start: Windows
Prerequisites:
- Windows 7 or newer
- [Git][getting-started:git]
- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack
First, download and bootstrap vcpkg itself; it can be installed anywhere,
but generally we recommend using vcpkg as a submodule for CMake projects,
and installing it globally for Visual Studio projects.
We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`,
since otherwise you may run into path issues for some port build systems.
```cmd
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```
To install the libraries for your project, run:
```cmd
> .\vcpkg\vcpkg install [packages to install]
```
You can also search for the libraries you need with the `search` subcommand:
```cmd
> .\vcpkg\vcpkg search [search term]
```
In order to use vcpkg with Visual Studio,
run the following command (may require administrator elevation):
```cmd
> .\vcpkg\vcpkg integrate install
```
After this, you can now create a New non-CMake Project (or open an existing one).
All installed libraries are immediately ready to be `#include`'d and used
in your project without additional configuration.
If you're using CMake with Visual Studio,
continue [here](#vcpkg-with-visual-studio-cmake-projects).
In order to use vcpkg with CMake outside of an IDE,
you can use the toolchain file:
```cmd
> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [build directory]
```
With CMake, you will still need to `find_package` and the like to use the libraries.
Check out the [CMake section](#using-vcpkg-with-cmake) for more information,
including on using CMake with an IDE.
For any other tools, including Visual Studio Code,
check out the [integration guide][getting-started:integration].
## Quick Start: Unix
Prerequisites for Linux:
- [Git][getting-started:git]
- [g++][getting-started:linux-gcc] >= 6
Prerequisites for macOS:
- [Apple Developer Tools][getting-started:macos-dev-tools]
- On macOS 10.14 or below, you will also need:
- [Homebrew][getting-started:macos-brew]
- [g++][getting-started:macos-gcc] >= 6 from Homebrew
First, download and bootstrap vcpkg itself; it can be installed anywhere,
but generally we recommend using vcpkg as a submodule for CMake projects.
```sh
$ git clone https://github.com/microsoft/vcpkg
$ ./vcpkg/bootstrap-vcpkg.sh
```
To install the libraries for your project, run:
```sh
$ ./vcpkg/vcpkg install [packages to install]
```
You can also search for the libraries you need with the `search` subcommand:
```sh
$ ./vcpkg/vcpkg search [search term]
```
In order to use vcpkg with CMake, you can use the toolchain file:
```sh
$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
$ cmake --build [build directory]
```
With CMake, you will still need to `find_package` and the like to use the libraries.
Check out the [CMake section](#using-vcpkg-with-cmake)
for more information on how best to use vcpkg with CMake,
and CMake Tools for VSCode.
For any other tools, check out the [integration guide][getting-started:integration].
## Installing Linux Developer Tools
Across the different distros of Linux, there are different packages you'll
need to install:
- Debian, Ubuntu, popOS, and other Debian-based distributions:
```sh
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
```
- CentOS
```sh
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash
```
For any other distributions, make sure you're installing g++ 6 or above.
If you want to add instructions for your specific distro,
[please open a PR][contributing:submit-pr]!
## Installing macOS Developer Tools
On macOS 10.15, the only thing you should need to do is run the following in your terminal:
```sh
$ xcode-select --install
```
Then follow along with the prompts in the windows that comes up.
On macOS 10.14 and previous, you'll also need to install g++ from homebrew;
follow the instructions in the following section.
### Installing GCC for macOS before 10.15
This will _only_ be necessary if you're using a macOS version from before 10.15.
Installing homebrew should be very easy; check out <brew.sh> for more information,
but at its simplest, run the following command:
```sh
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
Then, in order to grab an up-to-date version of gcc, run the following:
```sh
$ brew install gcc
```
You'll then be able to bootstrap vcpkg along with the [quick start guide](#quick-start-unix)
## Using vcpkg with CMake
If you're using vcpkg with CMake, the following may help!
### Visual Studio Code with CMake Tools
Adding the following to your workspace `settings.json` will make
CMake Tools automatically use vcpkg for libraries:
```json
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
截止到2020/12/3日最新版本的osg和osgEarth开发库,osg版本为3.6.4,osgEarth版本为2.10.2,最近刚编译的VS2017-x64位版本的开发库,里边包含 头文件/lib库/动态链接库+所有插件dll,编译器使用的是vs2017,x64 版本,由于VS2015/VS2017/VS2019之间二进制版本兼容,所有理论上本开发库可同时用于VS2015/VS2017/VS2019下的开发。
资源详情
资源评论
资源推荐
收起资源包目录
osgearth编译包 x64 vs2017 (2000个子文件)
vcpkg_completion.bash 523B
create_bin.bat 805B
make-openssl.bat 798B
bootstrap-vcpkg.bat 100B
nothing.bat 0B
blocktags 723B
gettimeofday.c 2KB
decomp.c 200B
.clang-format 1KB
vcpkg_configure_make.cmake 30KB
vcpkg.cmake 28KB
portfile.cmake 26KB
vcpkg_find_acquire_program.cmake 25KB
install_headers.cmake 24KB
boost-modular-build.cmake 21KB
vcpkg_fixup_pkgconfig.cmake 20KB
portfile.cmake 20KB
portfile.cmake 19KB
portfile.cmake 18KB
FindLAPACK.cmake 16KB
portfile.cmake 15KB
portfile.cmake 15KB
install_headers.cmake 15KB
vcpkg_configure_cmake.cmake 14KB
vcpkg_acquire_msys.cmake 14KB
compute_build_only.cmake 14KB
portfile.cmake 14KB
vcpkg_configure_meson.cmake 12KB
portfile.cmake 12KB
vcpkg_find_fortran.cmake 12KB
portfile.cmake 11KB
FindPostgreSQL.cmake 11KB
vcpkg-cmake-wrapper.cmake 11KB
portfile.cmake 11KB
portfile.cmake 10KB
portfile.cmake 10KB
vcpkg_fixup_cmake_targets.cmake 10KB
vcpkg_download_distfile.cmake 10KB
portfile.cmake 10KB
FindLAPACK.cmake 10KB
vcpkg_install_msbuild.cmake 9KB
portfile.cmake 9KB
vcpkg_common_definitions.cmake 9KB
vcpkg_build_make.cmake 9KB
vcpkg_build_nmake.cmake 9KB
portfile.cmake 9KB
vcpkg_from_sourceforge.cmake 8KB
qt_port_hashes_latest.cmake 8KB
qt_port_hashes.cmake 8KB
configure_qt.cmake 8KB
vcpkg_from_github.cmake 8KB
utilities.cmake 8KB
vcpkg_from_bitbucket.cmake 8KB
portfile.cmake 8KB
portfile.cmake 8KB
portfile.cmake 7KB
portfile.cmake 7KB
portfile.cmake 7KB
portfile.cmake 7KB
portfile.cmake 7KB
vcpkg_from_gitlab.cmake 7KB
vcpkg_configure_qmake.cmake 7KB
portfile.cmake 7KB
ports.cmake 7KB
qt_build_submodule.cmake 7KB
portfile.cmake 6KB
portfile.cmake 6KB
vcpkg_execute_build_process.cmake 6KB
portfile.cmake 6KB
vcpkg_check_features.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
ignition_modular_library.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
vcpkg_extract_source_archive_ex.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 6KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
vcpkg_build_msbuild.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
find_qt_mkspec.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
portfile.cmake 5KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
qq_37177723
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1