VS2010 boost 使用问题一例
最近有一个VS2010的工程用到了boost库,编译的时候报下面的错误:
>LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc100-mt-s-1_52.lib'
到boost库目录: ~boost_1_52_0\stage\lib 下一看,果然没有这个库,只有 libboost_thread-vc100-mt-gd-1_52.lib 与 libboost_thread-vc100-mt-1_52.lib。
那这个 'libboost_thread-vc100-mt-s-1_52.lib' 跟libboost_thread-vc100-mt-1_52.lib 有何差别呢?
-s
ABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag:
Key Use this library when: Boost.Build option s linking statically to the C++ standard library and compiler runtime support libraries. runtime-link=static g using debug versions of the standard and runtime support libraries. runtime-debugging=on y using a special debug build of Python. python-debugging=on d building a debug version of your code.7 variant=debug p using the STLPort standard library rather than the default one supplied with your compiler. stdlib=stlport
For example, if you build a debug version of your code for use with debug versions of the static runtime library and the STLPort standard library in “native iostreams” mode, the tag would be:-sgdpn. If none of the above apply, the ABI tag is ommitted.
原来,-s 代表 “runtime-link-static",我的工程是用这种方式使用boost库的,因此需要'libboost_thread-vc100-mt-s-1_52.lib'
于是重新编译boost库,用下面的编译命令:
b2 --build-dir=c:\boost-build --build-type=complete msvc stage link=static
VS2010 boost 使用问题一例的更多相关文章
- 主机与虚拟机通信:以主机VS2010连接虚拟机MySql为例
1.首先解决环境配置.网络互相通信的问题: 主机:Win7 32bit.虚拟机 Winxp 32bit(不要鄙视我不大会用unix之类的东西).使用virtualBox安装. 网络:虚拟机配置成Bri ...
- (七)boost库之单例类
(七)boost库之单例类 一.boost.serialzation的单件实现 单例模式是一种常用的软件设计模式.在它的核心结构中只包含一个被称为单例类的特殊类.通过单例模式可以保证系统中一个类只有一 ...
- 使用低版本的VS打开高版本项目的解决方案(以VS2008打开VS2010开发的项目为例)
使用低版本的VS打开高版本项目的解决方案,这里以VS2008打开VS2010开发的项目为例. 右键项目的sln文件以记事本的方式打开: 将对应的前两列版本各降到对应的版本,这边的11.00改为10.0 ...
- CC++初学者编程教程(3) 安装VS2010 boost标准库开发环境
1. BOOST编译过程非常复杂,目前为了学习BOOST,首先搭建基于VS2010的BOOST开发环境. Boost库 8 9. 10. 11 12 13 14 15. 16. 17. 18 ...
- 搭建vs2010 boost开发环境
一.编译boost库 第一步:下载boost库,下载地址http://sourceforge.net/projects/boost/files/boost/1.55.0/ 第二部:解压boost库,例 ...
- Boost Python官方样例(三)
导出C++类(纯虚函数和虚函数) 大致做法就是为class写一个warp,通过get_override方法检测虚函数是否被重载了,如果被重载了调用重载函数,否则调用自身实现,最后导出的时候直接导出wa ...
- Boost Python官方样例(二)
返回值 使用return_by_value有点像C++ 11的auto关键字,可以让模板自适应返回值类型(返回值类型必须是要拷贝到新的python对象的任意引用或值类型),可以使用return_by_ ...
- Boost Python官方样例(一)
配置环境 $ cat /etc/os-release NAME="Ubuntu" VERSION="16.04 LTS (Xenial Xerus)" ID=u ...
- boost多线程使用简例
原文链接:http://www.cppblog.com/toMyself/archive/2010/09/22/127347.html C++ Boost Thread 编程指南 转自cnblog: ...
随机推荐
- 全局scope与Isolate scope通信
AngularJS 全局scope与Isolate scope通信 在项目开发时,全局scope 和 directive本地scope使用范围不够清晰,全局scope与directive本地scope ...
- Fizzler
Fizzler 抓取网站数据不再是难事了,Fizzler(So Easy)全能搞定 首先从标题说起,为啥说抓取网站数据不再难(其实抓取网站数据有一定难度),SO EASY!!!使用Fizzler全搞定 ...
- table居中方法之一:设置width,然后为style设置margin:auto
比如: <table width="800px" style="margin:auto;">
- MySQL replace into 说明(insert into 增强版)
MySQL replace into 说明(insert into 增强版) 在插入数据到一个表时,通常是这种情况:1. 先推断数据是否存在: 2. 假设不存在,则插入:3.假设存在,则更新. 在 S ...
- 1cocos2dx扩展UI控制,CCControlSlider,CCScale9Sprite(九妹图。),CCControlSwitch,CCControlButton
UI控件来自cocos2dx的扩展库.完好了UI方面的元素,使cocos2dx更加丰富多彩.使用扩展库需包括: #include "cocos-ext.h" USING_NS ...
- leetcode[71] Sqrt(x)
题目,就是实现一个开方,返回是整数.int sqrt(int x) 用二分法,因为一个数的开方肯定小于 x/2 + 1, 因为小于5的某些数的开方并不一定比x/2小,所以要+1,那么们定义一个left ...
- jquery背景动画插件使用
在网页制作动画特效的时候,有时候想通过背景插入图片,然后通过控制背景显示的位置来实现一些动画效果,这样就不用使用绝对定位控制left和top来实现动画效果!但是jquery本身的动画函数是不支持背景动 ...
- iOS_1_加法器
: BeyondViewController.h // // BeyondViewController.h // 01_calc // // Created by beyond on 14-7-20. ...
- Byte[]、Image、Bitmap 之间的相互转换
原文:Byte[].Image.Bitmap 之间的相互转换 /// <summary> /// 将图片Image转换成Byte[] /// </summ ...
- 【转】android动画之Tween动画 (渐变、缩放、位移、旋转)
原文:http://blog.csdn.net/feng88724/article/details/6318430 Android 平台提供了两类动画. 一类是Tween动画,就是对场景里的对象不断的 ...