我喜欢使用(新)Visual Studio 2015(Enterprise)构建boost 1.58.0.在过去,我按以下方式进行:
C:\thirdparty\vs2013\x64\boost_1_58_0)VS2013 x64 Native Tools Command Prompt)cd C:\thirdparty\vs2013\x64\boost_1_58_0).\bootstrap.bat.\b2 -j8 --toolset=msvc-14.0 address-model=64 --build-type=complete stage但在VS2015中没有VS2015命令提示符.
还vcvarsall.bat缺少我有时用来设置VS2013命令提示符.
如何使用VS2015编译boost的源代码?
我需要在Fedora 24机器上构建Boost 1.62和1.63,但是使用GCC 4.9.3或GCC 5.4.0(取决于版本CUDA,这就是我需要旧编译器的原因).但是,如果我按照本答案中的描述设置自定义GCC版本并运行
/b2 --toolset=gcc-5.4.0 stage
Run Code Online (Sandbox Code Playgroud)
令我懊恼的是,我现在看到:
- 32-bit : no
- 64-bit : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
- symlinks supported : yes
- C++11 mutex : no
- lockfree boost::atomic_flag : yes
- Boost.Config Feature Check: cxx11_auto_declarations : no
- Boost.Config Feature Check: cxx11_constexpr : no
- Boost.Config Feature Check: cxx11_defaulted_functions : no
- Boost.Config Feature Check: cxx11_final …Run Code Online (Sandbox Code Playgroud) 我正在尝试为osx编译boost v1.55库,支持多线程.我的user-config.jam配置编译器如下:
using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libstdc++ -mmacosx-version-min=10.9
;
Run Code Online (Sandbox Code Playgroud)
我运行以构建库的命令如下:
./b2 -a -j8 toolset=clang-osx link=static threading=multi --with-thread
Run Code Online (Sandbox Code Playgroud)
但是,生成的库具有以下格式:libboost_.a,而不是libboost_-mt.a
有没有人知道为什么省略'-mt'标签?
在安装了Visual Studio .NET 2003 SP1的开发机器Vista SP1上
- 使用boost 1.44.0我使用bootstrap.bat生成b2.exe和bjam.exe没有问题
- 使用boost 1.57.0我收到此错误消息时运行bootstrap.bat:
Building Boost.Build engine
Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.
Run Code Online (Sandbox Code Playgroud)
这是从cmd.exe或Visual Studio .NET 2003命令提示符发生的.
我在boostrap.log中有这些错误:
builtins.c(1885):错误C2065:'FSCTL_GET_REPARSE_POINT':未声明的标识符builtins.c
(1889):错误C2065:'IO_REPARSE_TAG_SYMLINK':未声明的标识符
builtins.c包含
#ifdef OS_NT
#include <windows.h>
#ifndef FSCTL_GET_REPARSE_POINT
/* MinGW's version of windows.h is missing this, so we need
* to include winioctl.h directly
*/
#include <winioctl.h>
#endif
#endif
Run Code Online (Sandbox Code Playgroud)
和FSCTL_GET_REPARSE_POINT在VS .NET 2003提供的winioctl.h中
我想OS_NT定义由于某种原因缺失了?
注意:Boost 1.57.0 windows文档 仍然引用VS .NET 2003
文档可在此处获得,但令人震惊的是,没有 api 可以获取与dulinux 中的命令相同的目录大小。
https://www.backblaze.com/b2/docs
这有文件的 api,但没有目录大小的 api - https://www.backblaze.com/b2/docs/files.html
await b2.authorize();
await b2.listFileNames(bucketid);
await b2.getFileInfo(fileId) // gets the file info but directory has null in id field
Run Code Online (Sandbox Code Playgroud)
我们从上面得到这个结果 -
{ accountId: '11111111',
action: 'folder',
bucketId: '44444444444',
contentLength: 0,
contentSha1: null,
contentType: null,
fileId: null,
fileInfo: {},
fileName: 'test/testinside/',
uploadTimestamp: 0 }
Run Code Online (Sandbox Code Playgroud) 对不起,如果已经问过这个问题?我从源代码构建了强大的功能,但一直对构建工具感到困惑.从头开始构建boost库时应使用哪个工具.对我来说,似乎bootstrap.sh用于创建bjam可执行文件,然后应该使用bjam来进行实际构建.但是,我注意到你可以将很多参数传递给bootstrap.sh,例如要使用的工具集(编译器)和要构建的库等等......并使用bootstrap.sh启动构建
此外,至少有三种不同的方式来启动构建:./ bootstrap.sh,bjam,b2
有人可以总结每个人的目的,因为在线文档似乎没有解释这一点
谢谢!
安瓦尔
我正在尝试boost在64位系统上使用Visual Studio 2013 构建Windows 8.1.
b2 toolset="msvc" address-model=64 -s ZLIB_SOURCE=C:\H\M\zlib --build-type=complete stage
Run Code Online (Sandbox Code Playgroud)
这是完整的输出:
Performing configuration checks
- symlinks supported : no
- junctions supported : yes
- hardlinks supported : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
- has_icu builds : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
- iconv …Run Code Online (Sandbox Code Playgroud) 我目前正在尝试为 iOS 构建 Boost.Locale,但无法找到 iconv 库(我正在成功构建 Boost for iOS 的其他部分,例如thread或filesystem)。
我试图让 Boost.Build 自己找到它,我试图将变量设置ICONV_PATH为指向 iPhoneOS SDK iconv lib。检查 Boost.Locale 中的 Jamfile,我偶然发现了这条规则:
lib iconv
:
: <search>$(ICONV_PATH)/lib <link>shared <runtime-link>shared
:
: <include>$(ICONV_PATH)/include
;
Run Code Online (Sandbox Code Playgroud)
所以我认为设置-sICONV_PATH为/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr就足够了,因为这个目录包含一个lib和一个include包含 iconv lib 和标头的文件夹,但 Boost 仍然找不到它,并吐出:
iconv (libc) : no
iconv (separate) : no
icu : no
icu (lib64) : no
Boost.Locale needs either iconv or ICU library to be built.
Run Code Online (Sandbox Code Playgroud)
请注意,我总是b2使用该--reconfigure …
我正在尝试使用以下说明在 Visual Studio 的 x64 终端上构建 boost:https : //www.boost.org/doc/libs/1_62_0/more/getting_started/windows.html#get-boost
我愿意:
boostrap
然后
.\b2 address-model=64
但它总是说:
C:\boost_1_70_0>.\b2 address-model=64
Performing configuration checks
- default address-model : 32-bit
- default architecture : x86
Building the Boost C++ Libraries.
...
Run Code Online (Sandbox Code Playgroud)
然后继续构建所有内容的 32 位版本。我知道这一点,因为当我尝试对 CMake 之类的东西使用 boost 时,它抱怨它的 32 位:
C:\src\SimpleAmqpClient\simpleamqpclient-build>cmake -DBOOST_ROOT=C:\boost_1_70_0 -DBOOST_LIBRARYDIR=C:\boost_1_70_0\stage\lib ..
-- Found Boost 1.70.0 at C:/Program Files/boost/lib/cmake/Boost-1.70.0
-- Requested configuration: QUIET REQUIRED COMPONENTS chrono;system
-- Found boost_headers 1.70.0 at C:/Program Files/boost/lib/cmake/boost_headers-1.70.0
-- Found boost_chrono 1.70.0 at C:/Program Files/boost/lib/cmake/boost_chrono-1.70.0
-- No …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Windows 10 上安装 boost 库。我安装了 VS2017。我打开了 Developer Command Prompt 2017,我已经输入了boostrap,现在在编写时b2,我收到以下错误:
C:\Program Files\boost\boost_1_60_0>b2
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:1072: in configure-really
*** argument error
* rule generate-setup-cmd ( version : command : parent : options * : cpu : global-setup : default-global-setup-options : default-setup )
* called with: ( default : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86 : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx86 : : i386 : : x86 : vcvars32.bat )
* missing argument global-setup
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:798:see definition of rule …Run Code Online (Sandbox Code Playgroud) b2 ×10
boost ×9
c++ ×7
bjam ×3
boost-build ×1
boost-locale ×1
c++11 ×1
cmake ×1
gcc ×1
ios ×1
node.js ×1
visual-c++ ×1