GithubHelp home page GithubHelp logo

fananchong / use_vs2017 Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 7.0 161 KB

演示基于 win10、vs2017 开发 C++ Linux 程序的一些技巧

License: MIT License

C++ 9.07% CMake 43.28% C 5.46% Shell 26.87% Dockerfile 15.32%
vcpkg wsl cmake vs2017 docker

use_vs2017's Introduction

use_vs2017

这里演示基于 win10、vs2017 开发 C++ Linux 程序的一些技巧。

主要用到以下功能:

  • vcpkg
  • WSL (windows subsystem linux)
  • cmake
  • docker for windows

vcpkg

通过使用 vcpkg ,将极大的方便 C++ 第3方库的管理

如何安装参见 github 官网:https://github.com/Microsoft/vcpkg

使用 vcpkg + cmake,将达成一个命令安装第3方库(windows、linux等等)

WSL

Windows Linux 子系统,官方介绍:https://blogs.msdn.microsoft.com/wsl/2016/04/22/windows-subsystem-for-linux-overview/

使用它使得可以告别:

  • bat、sh 脚本需要各实现一遍
  • 相应的2进制工具需要各编译一遍

即,windows 上开发,可以全部保持 linux 系工具、脚本

cmake

vs2017 完全支持 cmake,并通过它实现 vs2017 加载同一份 cmake 工程,达成 Windows 下 win 或 调试 linux 版本。

docker for windows

使用 docker 可以达成统一的开发环境、部署环境等等。

这里用它还有一个用途:单机 windows 开发 linux 程序,还需要使用 docker 运行一个 Linux 机。(当然也可以直接使用物理 Linux 机)

例子说明

  • example1

    vcpkg 在 vs2017 中的简单使用

  • example2

    vcpkg 在 vs2017 cmake中的简单使用

    vs2017 cmake 在 window、linux 下调试代码

  • example3

    vcpkg 打包第3方库的例子

  • example4

    WSL使用例子

  • example5

    docker for windows,制作 单机 windows 开发 linux 程序 用的 docker虚拟Linux机

use_vs2017's People

Contributors

fananchong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.