windows系统VS2017编译boost
1. 下载boost, 解压,进入boost源目录
2. 打开vs2017 x86 CMD工具,输入bootstrap.bat,等待初始化完毕
x86编译
bjam stage --toolset=msvc-14.1 --without-graph --without-graph_parallel --stagedir="D:\boost\boost_1_69_0\bin\vc141-x86" link=static runtime-link=shared runtime-link=static threading=multi debug release
3. VS2017
创建测试项目
// TestBoost.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
// #include "pch.h" #include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
#include <iostream>
using namespace std;
int main()
{
using boost::lexical_cast;
int a = lexical_cast<int>("123");
double b = lexical_cast<double>("123.0123456789");
string s0 = lexical_cast<string>(a);
string s1 = lexical_cast<string>(b);
cout << "number: " << a << " " << b << endl;
cout << "string: " << s0 << " " << s1 << endl;
int c = 0;
try {
c = lexical_cast<int>("abcd");
}
catch (boost::bad_lexical_cast& e) {
cout << e.what() << endl;
}
return 0;
}
配置头文件和库目录

清理,重新生成,运行,测试。
windows系统VS2017编译boost的更多相关文章
- 在 Windows系统中编译node.js 源代码
Node.js 在 Windows 下只能通过 Microsoft Visual Studio 编译,因此你需要首先安装 Visual Studio 或者免费的 Visual Studio Expre ...
- VS2017编译boost库
1.http://www.boost.org/ 下载boost库. 2.解压到 D:\ProgramFiles\boost 3.环境配变量配置 VS2017更加注重跨平台性,安装文件较 ...
- Windows下VS2017编译OpenCV 3.4.0-rc
简述 很久没有用过OpenCV了,这次需要做一点图像处理相关的工作,又需要用起来,这里记录一下编译的过程.之前介绍过使用vs2015编译opencv2.4的帖子在这里. 编译好的文件在这里https: ...
- 阿里物联网平台(一)Windows系统+VS2017 模拟设备端接入
https://blog.csdn.net/panwen1111/article/details/88365636 一.阿里物联网平台 平台地址:https://account.aliyun.com ...
- vs2017编译boost 1.70.0
目前最新版本的boost库是1.70.0.现在在学习使用cinatra搭建c++的http服务器,需要用到boost库中的asio,下载了一下最新版本的boost库,捣鼓了半天. 1.下载 boost ...
- go语言在Windows系统下编译成linux系统可执行文件
package main import ( "fmt" "os" "os/exec" ) //filepath: 要编译的文件的路径 fun ...
- 如何在Windows系统上基于Sublime搭建Python的编译环境
刚刚接触到Python,直接在计算机上编译时不能正确的运行,所以将一些有关编译环境调试的知识总结了一下. 环境搭建: Python在 windows系统上编译的时候可能会出现一些编译无法运行的情况,我 ...
- windows系统,boost编译安装
windows系统,boost编译安装vs2017 1.下载https://www.boost.org/users/download/下载windows对应的zip包解压 2.配置vc环境变量我的是: ...
- boost在windows下的编译(vs2010)
首先说下环境,win7,vs2010. 先在http://www.boost.org/users/download/上下载boost安装包,我下的是1.52.0版. 按照说明,直接运行“bootstr ...
随机推荐
- 洛谷P4704 太极剑(乱搞)
题意 题目链接 Sol 不会正解 写了发暴力过了,貌似跑的还挺快?.. // luogu-judger-enable-o2 // luogu-judger-enable-o2 #include< ...
- 如何理解MVC?
MVC全名是Model View Controller,是模型(model)-视图(view)-控制器(controller)的缩写,一种软件设计典范. 那么MVC框架究竟干了些什么:用一种业务逻辑. ...
- Human Motion Analysis with Wearable Inertial Sensors——阅读3
Human Motion Analysis with Wearable Inertial Sensors——阅读3 四元数方向滤波器 之前的研究开发了一种自适应增益互补滤波器,并结合高斯 - 牛顿优化 ...
- 如何用ABP框架快速完成项目(4) - 如何正确使用ABP?
正如我在<如何用ABP框架快速完成项目(2) - 快的定义!>提到的, 很多同学在使用ABP中遇到很多问题, 花了很多时间和精力, 然而从最根本的角度和方向上来看这些问题应该是不存在. 这 ...
- redis 数据库安装和基本使用
Redis 介绍: Redis是一款开源的.高性能的键-值存储(key-value store).它常被称作是一款数据结构服务器(data structure server). Redis的键值可以包 ...
- C# Partial:分部方法和分部类
using System; namespace Partial { class Program { static void Main(string[] args) { A a = new A(); } ...
- git 入门教程之回到过去
回到过去 背景 现在你已经掌握git的基本操作了,文件发生更改首先使用 git add 添加更改,然后 git commit 提交全部更改,当本地文件再次发生更改时,仍然需要git add 和 git ...
- java笔记----java新建生成用户定义注释
${filecomment} ${package_declaration} /** * @author ${user} * @date 创建时间:${date} ${time} * @version ...
- springmvc复习笔记----Restful 风格,PathVariable获取 Url实例
结构 包与之前相同 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=&qu ...
- [20170612]FOR ALL COLUMNS SIZE repeat(11g).txt
[20170612]FOR ALL COLUMNS SIZE repeat(11g).txt --//昨天看了https://jonathanlewis.wordpress.com/2017/06/0 ...