首页 文章

无法构建Boost系统库

提问于
浏览
0

我正在尝试使用命令从Boost构建“系统”库:

bjam --toolset = gcc target-os = qnx --build-dir = c:\ boost_1_57_0 --build-type = complete --with-system stage

并继续得到错误:

C:\ boost_1_57_0> bjam --toolset = gcc target-os = qnx --build-dir = c:\ boost_1_57_0 --build-type = complete --with-system stage ...找到1个目标....... ..updating 1 target ... config-cache.write c:\ boost_1_57_0 \ boost \ bin.v2 \ project-cache.jam ...更新1目标...组件配置: - 原子:不构建

  • chrono:没有建筑
  • 容器:没有建造
  • 背景:没有建设
  • 协程:没有建设
  • date_time:没有建设
  • 例外:没有建设
  • filesystem:not build
  • 图:没有建筑
  • graph_parallel:没有 Build
  • iostreams:没有建设
  • 语言环境:没有建设
  • 日志:没有建设
  • 数学:没有建设
  • mpi:没有建设
  • program_options:没有 Build
  • python:没有建设
  • 随机:不建设
  • 正则表达式:没有 Build
  • 序列化:没有 Build
  • 信号:没有建设
  • 系统:建设
  • 测试:没有建设
  • 线程:没有 Build
  • 计时器:没有建设
  • 波浪:没有建筑
    ...找到205个目标......更新4个目标... gcc.link.dll c:\ boost_1_57_0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ debug \ target-os-qnx \ threading-multi \ libboost_system-mgw48-mt-d-1_57.so.1.57.0 c:/ mingw / bin /../ lib / gcc / mingw32 / 4.8.1 /../ .. /../../mingw32/bin/ld.exe:找不到-lrt collect2.exe:错误:ld返回1退出状态“g”-o“c:\ boost_1_57_0 \ boost \ bin.v2 \ libs \ system \构建\ GCC-的mingw-4.8.1 \调试\目标-OS-QNX \线程的多\ libboost_system-mgw48-MT-d-1_57.so.1.57.0"
    -shared -Wl, - start-group“c:\ boost_1_57 _0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ debug \ target-os-qnx \ threading-multi \ error_code .o“-Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl, - end-group -g -pthread ... failed gcc.link.dll c:\ boost_1_57_0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ debug \ target-os-qnx \ threading-multi \ libboost_system-mgw48-mt-d-1_57.so.1.57.0 ......跳过libboost_system-mgw48-mt -d-1_57.so.1.57.0缺少libboost_system-mgw48- mt-d-1_57.so.1.57.0 ... gcc.link.dll c:\ boost_1_57_0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ release \ target-os-qnx \ threading-multi \ libboost_system-mgw48-mt-1_57.so.1.57.0 c:/ mingw / bin /../ lib / gcc / mingw32 / 4.8.1 /../../../../ mingw32 / bin / ld.exe:找不到-lrt collect2.exe:错误:ld返回1退出状态“g”-o“c:\ boost_1_57_0 \提升\ bin.v2 \库\ SYSTEM \建设\ GCC-MinGW的-4.8.1 \发布\目标操作系统QNX \线程的多\ libboost_system-mgw48-MT-1_57.so.1.57.0"
    -shared -Wl, - start-group“c:\ boost_1_57 _0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ release \ target-os-qnx \ threading-multi \ error_code .o“-Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl, - end-group -pthread ... failed gcc.link.dll c:\ boost_1_57_0 \ boost \ bin.v2 \ libs \ system \ build \ gcc-mingw-4.8.1 \ release \ target-os-qnx \ threading-multi \ libboost_system-mgw48-mt-1_57.so.1.57.0 ......跳过了libboost_system-mgw48-mt-1_57.so .1.57.0缺少libboost_system-mgw48- mt-1_57.so.1.57.0 ......无法更新2个目标......跳过2个目标......

rt lib似乎缺失了,我在哪里可以获得这样的lib来成功编译'system'lib?

1 回答

  • 1

    解决我的问题:

    • 首先要做的是获得MinGW并将其放在C:\ MinGW下 .

    • 在C:\ MinGW \ bin中应该有gcc

    • 运行cmd .

    • 在boost(deflaut C:\ boost_1_57_0)主文件夹中

    • 使用命令设置路径:'set PATH=c:\mingw\bin;%PATH%'

    • 转到boost文件夹的tools \ build目录并运行'bootstrap mingw'

    • 在根目录类型中构建系统库:

    • 'tools\build\b2 toolset=gcc --target-os=qnxnto --build-type=complete stage --with-system'

    • .a文件将位于stage \ libs文件夹中

相关问题