参考:http://www.cnblogs.com/fullsail/archive/2011/10/07/2200948.html
从开始菜单运行VS2012 x64兼容工具命令提示,切换到stlport目录,比如我的:D:\soft\STLport\STLport-5.2.0。然后执行命令:
configure --help,会看到msvc9,然后执行configure msvc9;
进入build/lib目录执行:nmake -f msvc.mak clean install;会报一个错误:
\stlport\stl/_cstdlib.h(158) : error C2084: 函数“__int64 abs(__int64)”已有主体,修改源码为
#if !defined(_STLP_MSVC) || (_STLP_MSVC < 1600)
inline
_STLP_LONG_LONG
abs
(_STLP_LONG_LONG __x) {
return
__x < 0 ? -__x : __x; }
#endif
|
编译好的动态库在bin目录里面,静态库在lib目录里面。这些是从build\lib\obj\vc9目录里面复制过来,可以把这个目录删掉,节省空间。