gpt4 book ai didi

c++ - 使用 minGW 构建 Boost

转载 作者:行者123 更新时间:2023-11-30 01:55:19 25 4
gpt4 key购买 nike

我使用 CodeBlocks(minGW),但在构建 boost 时遇到了问题。 “C:\Program Files (x86)\CodeBlocks\MinGW\bin”在 Path 变量中,我能够使用“bootstrap.bat gcc”构建 b2 和 bjam,但在“b2 toolset=gcc --build-type=完成”我得到了一些错误。

输出:

link.jam: No such file or directoryBuilding the Boost C++ Libraries.Performing configuration checks    - 32-bit                   : yes    - arm                      : no    - mips1                    : no    - power                    : no    - sparc                    : no    - x86                      : yes    - has_icu builds           : nowarning: Graph library does not contain MPI-based parallel components.note: to enable them, add "using mpi ;" to your user-config.jam    - zlib                     : no    - iconv (libc)             : no    - iconv (separate)         : no    - icu                      : no    - icu (lib64)              : no    - g++ -shared-* supported  : yes    - message-compiler         : no    - compiler-supports-ssse3  : yes    - compiler-supports-avx2   : yes    - gcc visibility           : yes    - long double support      : yeswarning: 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.warning: No python installation configured and autoconfigurationnote: failed.  See http://www.boost.org/libs/python/doc/building.htmlnote: for configuration instructions or pass --without-python tonote: suppress this message and silently skip all Boost.Python targets    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)    - zlib                     : no  (cached)C:/libs/boost_1_55_0/tools/build/v2/build\virtual-target.jam:1099: in virtual-target.register-actual-name from module virtual-targeterror: Duplicate name of actual target: libboost_exception-mgw47-mt-1_55.aerror: previous virtual target { common%common.copy-libboost_exception-mgw47-mt-1_55.a.STATIC_LIB { gcc%gcc.archive-libboost_exception-mgw47-mt-1_55.a.STATIC_LIB { gcc%gcc.compile.c++-clone_current_exception_non_intrusive.o.OBJ { clone_current_exception_non_intrusive.cpp.CPP } } } }error: created from ./stage-propererror: another virtual target { common%common.copy-libboost_exception-mgw47-mt-1_55.a.STATIC_LIB { gcc%gcc.archive-libboost_exception-mgw47-mt-1_55.a.STATIC_LIB { gcc%gcc.compile.c++-clone_current_exception_non_intrusive.o.OBJ { clone_current_exception_non_intrusive.cpp.CPP } } } }error: created from ./stage-propererror: added properties: -shared-libgcc -shared-libstdc++error: removed properties: noneC:/libs/boost_1_55_0/tools/build/v2/build\virtual-target.jam:484: in actualize-no-scanner from module object(file-target)@5267C:/libs/boost_1_55_0/tools/build/v2/build\virtual-target.jam:134: in class@virtual-target.actualize from module object(file-target)@5267C:/libs/boost_1_55_0/tools/build/v2\build-system.jam:720: in load from module build-systemC:\libs\boost_1_55_0\tools\build\v2/kernel\modules.jam:289: in import from module modulesC:\libs\boost_1_55_0\tools\build\v2/kernel/bootstrap.jam:139: in boost-build from moduleC:\libs\boost_1_55_0\boost-build.jam:17: in module scope from module

最佳答案

(这是由 OP 在问题编辑中回答的。转换为社区维基答案。参见 Question with no answers, but issue solved in the comments (or extended in chat))

OP 写道:

I tried b2 toolset=gcc and it works. I got the Error "undefined reference to boost::system::.." when I tried to use boost::threads and solved it with linking:

boost_thread-mgw47-mt-1_55
boost_system-mgw47-mt-1_55

关于c++ - 使用 minGW 构建 Boost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20844791/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com