vs2010 使用STLport-5.2.1
来源:互联网 发布:淘宝花呗还款有利息吗 编辑:程序博客网 时间:2024/04/30 11:47
下载地址: http://sourceforge.net/projects/stlport/
下载后解压,假设目录为:D:\STLport,接下来就该编译它了:
1.在开始菜单中找到VC 命令行工具,接下来切换到D:\STLport\STLport-5.2.1目录。
2.可以运行configure –help看看编译选项,用MSVC编译器编译的话,输入以下命令:
configure msvc9(configure msvc10 会显示 Unknown compiler: msvc10, msvc9即可)
3.输入
cd build
cd lib
4.输入
nmak clean install
(在第二步的时候会有提示让你输入安装命令)
如果不出错,稍等几分钟就OK了。
假若出现如下错误:
D:\STLport\STLport-5.2.1\stlport\stl/_cstdlib.h(158) : error C2084: function'__int64 abs(__int64)' already has a body
C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\../include/stdlib.h(471) : see previous definition of 'abs'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
用vs2010打开D:\STLport\STLport-5.2.1目录下的_cstdlib.h文件(可以搜索到),找到158行:158 inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; }
将代码修改为:
#if !defined(_STLP_MSVC) || (_STLP_MSVC < 1600)
inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; }
#endif
这样保存并重新编译安装即可。
使用 STLport
使用STLport除了向项目添加 STLport 的头文件目录和 Lib 目录以外还有如下宏定义配合使用。
1 #define _STLP_USE_STATIC_LIB // 使用 STLport 静态库
2 #define _STLP_USE_DYNAMIC_LIB // 使用 STLport 动态库
3 #define _STLP_DEBUG // STLport 启用 Debug 模式下的检查功能
4 #define _STLP_USE_BOOST_SUPPORT // STLport 与 Boost 库配合使用
- vs2010 使用STLport-5.2.1
- vs2010 使用STLport-5.2.1
- vs2010 使用STLport-5.2.1
- vs2010 使用STLport-5.2.1
- vs2010 使用STLport-5.2.1
- vs2010 编译 stlport 5.2.1
- VS2010/VS2012编译Stlport 5.2.1
- Win7下VS2010使用STLPort .
- Win7下VS2010使用STLPort .
- Win7下VS2010使用STLPort .
- vs2012 使用STLport-5.2.1
- vs2012 使用STLport-5.2.1
- VS2010 + STLport + Boost 的编译使用
- VS2010 + STLport + Boost 的编译使用
- VS2010 + STLport + Boost 的编译使用
- vs2012-vs2010使用stlport库的配置
- VS2010下安装和使用STLport库
- STLPort - install 5.2.1
- Ext-grid-Panel
- zencart怎么装插件
- QPainter类的使用
- 位图方法排序
- 记下 自己学习 tinyxml 的事情
- vs2010 使用STLport-5.2.1
- hdu 1503 DP
- Machine Learning(五—2)神经网络学习
- 高手们的播客
- 关于AIX VG中 LV 的状态问题,LV STATE
- ------79事件---------
- Hadoop and Sort Benchmark
- char,short ,int ,long,long long,unsigned long long数据范围
- Struts2的工作原理