我正在尝试在 windows 上使用 zlib 支持构建 boost 库。我需要使用intel c ++编译器,因为我需要它具有的某些功能。我已经能够使用Visual Studio编译器通过zlib支持来构建boost,但是由于某些原因,当我使用intel编译器时boost无法识别zlib。
使用Visual Studio编译器,我使用this post在具有zlib和bzip2支持的Windows上进行了增强构建。但是,我需要使用intel编译器进行构建,因为Visual Studio生产的库似乎不兼容。最初我对此有一些问题,但是this post help me克服了一些最初的不兼容问题。 我无法成功地将两者结合在一起。
我试图使用以下命令通过intel编译器构建具有zlib支持的boost库:
.\b2.exe -j7 --build-type=complete address-model=64 architecture=x86 -s BZIP2_BINARY=libbz2 -s BZIP2_INCLUDE=C:\lib\GnuWin32\src\bzip2\1.0.5\bzip2-1.0.5 -s BZIP2_LIBPATH=C:\lib\GnuWin32\src\bzip2\1.0.5\
bzip2-1.0.5 -s ZLIB_BINARY=zlib -s ZLIB_INCLUDE=C:\lib\zlib-1.2.11-Self\zlib-1.2.11 -s ZLIB_LIBPATH=C:\lib\zlib-1.2.11-Self\zlib-1.2.11 threading=multi link=static,shared runtime-link=shared --toolset=intel --debug --user-
config=intel-user-config.jam
我的问题:它构建了库,但没有zlib支持。我得到以下输出:
testing module modules...
testing module assert...
testing module errors...
testing module sequence...
testing module numbers...
testing module string...
testing module regex...
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:48: Unescaped special character in argument ([0-9]+).*
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:171: Unescaped special character in argument /Zc:forScope
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:197: Unescaped special character in argument /Zc:wchar_t
Performing configuration checks
- default address-model : 32-bit
- default architecture : arm
Building the Boost C++ Libraries.
- C++11 mutex : yes
- Boost.Config Feature Check: cxx11_auto_declarations : yes
- Boost.Config Feature Check: cxx11_constexpr : yes
- Boost.Config Feature Check: cxx11_defaulted_functions : yes
- Boost.Config Feature Check: cxx11_final : yes
- Boost.Config Feature Check: cxx11_hdr_mutex : yes
- Boost.Config Feature Check: cxx11_hdr_tuple : yes
- Boost.Config Feature Check: cxx11_lambdas : yes
- Boost.Config Feature Check: cxx11_noexcept : yes
- Boost.Config Feature Check: cxx11_nullptr : yes
- Boost.Config Feature Check: cxx11_rvalue_references : yes
- Boost.Config Feature Check: cxx11_template_aliases : yes
- Boost.Config Feature Check: cxx11_thread_local : yes
- Boost.Config Feature Check: cxx11_variadic_templates : 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
- zlib : no
- bzip2 : no
- lzma : no
- zstd : no
- iconv (libc) : no
- iconv (separate) : no
- icu : no
- icu (lib64) : no
- native-atomic-int32-supported : yes
- message-compiler : no
- native-syslog-supported : yes
- pthread-supports-robust-mutexes : yes
- compiler-supports-ssse3 : yes
- compiler-supports-avx2 : yes
- gcc visibility : yes
- long double support : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
- libbacktrace builds : no
- addr2line builds : no
- WinDbg builds : no
- WinDbgCached builds : no
- BOOST_COMP_GNUC >= 4.3.0 : yes
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
- zlib : no
- bzip2 : no
- lzma : no
- zstd : no
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
Component configuration:
- atomic : building
- chrono : building
- container : building
- context : building
- contract : building
- coroutine : building
- date_time : building
- exception : building
- fiber : building
- filesystem : building
- graph : building
- graph_parallel : building
- iostreams : building
- locale : building
- log : building
- math : building
- mpi : building
- program_options : building
- python : building
- random : building
- regex : building
- serialization : building
- stacktrace : building
- system : building
- test : building
- thread : building
- timer : building
- type_erasure : building
- wave : building
当我运行相同的命令但没有toolset=intel --user-
config=intel-user-config.jam
标志时,它会成功使用Visual Studio编译器,并使用zlib进行构建,即结果为:
- zlib : yes
- bzip2 : yes
我希望intel编译器也接受zlib的路径,因为Visual Studio的编译器似乎可以接受它,但是出于某种原因,它不能接受。