使用Boost的多个STLport配置
Using multiple STLport configurations with Boost
我使用Boost (1.54.0, bjam 2011.12.1)。OS=NT)与STLport(5.2.1)在Windows CE开发项目。我首先从一个Windows CE平台SDK开始,一切都很顺利。但是现在我需要支持几个Windows CE平台sdk,每个sdk都有自己的系统头文件和编译标志。
首先,我为这些平台(例如PLATFORM1和PLATFORM2)构建了STLport,并将STLport库放在c:libSTLport-5.2.1libPLATFORM1
和c:libSTLport-5.2.1libPLATFORM2
上。
然后,在user-config.jam
中我有:
using stlport : 5.2.1~PLATFORM1 : c:/lib/STLport-5.2.1/stlport : c:/lib/STLport-5.2.1/lib/PLATFORM1 ;
using stlport : 5.2.1~PLATFORM2 : c:/lib/STLport-5.2.1/stlport : c:/lib/STLport-5.2.1/lib/PLATFORM2 ;
然后,对于PLATFORM1,我通过运行带有stdlib=stlport-5.2.1~PLATFORM1
标志的bjam.exe来构建Boost库,而构建PLATFORM2使用stdlib=stlport-5.2.1~PLATFORM2
。
但是bjam对PLATFORM2使用了错误的STLport库路径。例如,带-n标志运行bjam会显示以下平台链接命令(注意第二个调用中错误的LIBPATH参数):
link.exe ... /out:"building...stdlib-stlport-5.2.1~PLATOFRM1threading-multiboost_xxx.dll" ... /LIBPATH:"c:libSTLport-5.2.1libPLATFORM1"
link.exe ... /out:"building...stdlib-stlport-5.2.1~PLATOFRM2threading-multiboost_xxx.dll" ... /LIBPATH:"c:libSTLport-5.2.1libPLATFORM1"
基本上,它总是使用用户配置中的第一个using stlport
指令。无论我传递给stdlib参数的是哪个版本。我做错了什么吗?设置环境以能够使用不同的STLport二进制文件构建Boost的正确方法是什么?
我通过使用一个特殊变量来定义STLport库的位置来解决这个问题。基本上,我是这样做的。
在user-config.jam
中,我将所有STLport工具集初始化更改为单个:
c:/lib/stlport -5.2.1/stlport:c:/lib/STLport-5.2.1/lib/美元(STLPORTLIBSUBDIR) ,此外,为了查看变量,我在using指令之前添加了以下行:
local STLPORTLIBSUBDIR = [modules. conf]
然后,为PLATFORM1构建Boost库,我需要向bjam传递以下参数:
stdlib=stlport-5.2.1
和-sSTLPORTLIBSUBDIR=PLATFORM1
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- 无法找到/读取配置文件.conf-FileIOException
- 在WSL:configure_file上对config_file的每次调用都失败:配置文件时出现问题
- 一种在C++中读取TXT配置文件的简单方法
- 生成MRPT库时cmake配置失败
- FFMPEG配置文件级别id大小无效
- 如何通过Conan和CMake找到用于pkg配置的.pc文件
- 配置文件解析器仅返回以前的值
- STLPort using C++11
- 我的程序有一个保存配置文件的GUI,如何双击此配置文件以直接加载带有配置数据的GUI?
- 更改命令行 qt5 源代码构建配置的正确/快速方法
- 是否可以配置提升日志刷新?
- 如何配置Visual Studio Code以使用cygwin,cmake和gcc进行调试
- C/C++:打印(配置)头文件的内容
- 配置:错误:找不到 MySQL 包含目录
- 安装 psutil 和为 pypy 配置期间出错
- 叮当格式化程序多行格式配置错误
- 使用 Eclipse CDT 进行 Cplex 配置
- 为c++配置Visual studio代码
- 使用Boost的多个STLport配置