stlport5.2.1编译
来源:互联网 发布:海岛奇兵火箭炮手数据 编辑:程序博客网 时间:2024/06/04 20:02
下载地址: 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 库配合使用
0 0
- stlport5.2.1编译
- STLport5.2.1 编译指南
- MinGW 编译安装 STLPort5.1.0
- VC9.0,VC10.0编译64位STLport5.2.1和Boost
- VC6.0+icc编译STLPort5.2
- VC6.0+icc编译STLPort5.2
- 【转】VC6.0+icc编译STLPort5.2
- vs2012 64位编译stlport5.20
- vc6.0下安装配置stlport5.2.1
- VS2008 STLport5.2.1爬虫使用实例
- 用Intel C++ Compiler 9.1编译STLPort5.1
- VC6.0下编译STLport5.1.3和Boost 库
- Boost_1_55_0+StlPort5.2.1+VS2010在xp环境搭建
- STLport5在VC6上的安装技巧(主要参考为孟岩文章)
- 编译Andriod源码 2.1
- ubuntu编译hadoop1.2.1
- QT5.2.1 Poppler编译
- 编译
- Eclipse常见错误
- 使用Texmacs帮助您写格式规范统一的BLOG
- android查看task栈
- NullPointerException When create Project from scource
- Creating Mutable and Immutable StringObjects
- stlport5.2.1编译
- ACCESSING THE CLOUD FROM COCOA TOUCH
- Consuming XML Web Services in iPhone Applications
- java_xml读取
- 用Preferences API 存储对象
- 解决序列化中的问题java.io.StreamCorruptedException: invalid stream header:EFBFBDEF
- vim常用命令之多行注释和多行删除
- NSArray and KVC (muti-value per key)
- Erlang 函数(Efficiency Guide)