无法构建Boost系统库

时间:2014-12-29 11:08:11

标签: c++ gcc boost mingw qnx

我正在尝试使用命令从Boost构建'system'库:

  

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个目标...... ...更新1个目标... config-cache.write   c:\ boost_1_57_0 \ boost \ bin.v2 \ project-cache.jam ...更新了1个目标......

     

组件配置:

- atomic                   : not building
- chrono                   : not building
- container                : not building
- context                  : not building
- coroutine                : not building
- date_time                : not building
- exception                : not building
- filesystem               : not building
- graph                    : not building
- graph_parallel           : not building
- iostreams                : not building
- locale                   : not building
- log                      : not building
- math                     : not building
- mpi                      : not building
- program_options          : not building
- python                   : not building
- random                   : not building
- regex                    : not building
- serialization            : not building
- signals                  : not building
- system                   : building
- test                     : not building
- thread                   : not building
- timer                    : not building
- wave                     : not building
     

...找到了205个目标......更新了4个目标...... gcc.link.dll   C:\ boost_1_57_0 \升压\ bin.v2 \库\ SYSTEM \构建\ GCC-的mingw-4.8.1 \调试\目标-OS-QNX \线程的多\ libboost_system-mgw48-MT-d-1_57.so.1.57 0.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\build\gcc-mingw-4.8.1\debug\target-os-qnx\threading-multi\libboost_system-mgw48-mt-d-1_57.so.1.57.0"
     

-shared -Wl, - start-group“c:\ boost_1_57   _0 \提升\ bin.v2 \库\ SYSTEM \建设\ GCC-MinGW的-4.8.1 \调试\目标操作系统QNX \线程,多\ error_code.o”   -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl, - end-group -g -pthread

     

... gcc.link.dll失败了   C:\ boost_1_57_0 \升压\ bin.v2 \库\ SYSTEM \构建\ GCC-的mingw-4.8.1 \调试\目标-OS-QNX \线程的多\ libboost_system-mgw48-MT-d-1_57.so.1.57 0.0 ...   ...跳过了libboost_system-mgw48-mt-d-1_57.so.1.57.0 for   缺乏   libboost_system-mgw48-   mt-d-1_57.so.1.57.0 ... gcc.link.dll   C:\ boost_1_57_0 \提升\ bin.v2 \库\ SYSTEM \建设\ GCC-MinGW的-4.8.1 \发布\目标操作系统QNX \线程的多\ 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\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"
     

-shared -Wl, - start-group“c:\ boost_1_57   _0 \提升\ bin.v2 \库\ SYSTEM \建设\ GCC-MinGW的-4.8.1 \发布\目标操作系统QNX \线程,多\ error_code.o”   -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl, - end-group -pthread

     

... gcc.link.dll失败了   C:\ boost_1_57_0 \提升\ bin.v2 \库\ SYSTEM \建设\ GCC-MinGW的-4.8.1 \发布\目标操作系统QNX \线程的多\ libboost_system-mgw48-MT-1_57.so.1.57.0 ...   ...跳过了libboost_system-mgw48-mt-1_57.so.1.57.0 for   缺乏   libboost_system-mgw48-   mt-1_57.so.1.57.0 ......无法更新2个目标......跳过2   目标...

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

1 个答案:

答案 0 :(得分:2)

解决我的问题:

  • 要做的第一件事就是将MinGW放在C:\ MinGW。
  • 在C:\ MinGW \ bin中应该有gcc
  • 运行cmd。
  • 在boost(deflaut C:\ boost_1_57_0)主文件夹
  • 使用命令设置路径:'设置PATH = c:\ mingw \ bin;%PATH%'
  • 转到boost文件夹的tools \ build目录并运行' bootstrap mingw'
  • 以根目录类型构建系统lib:
  • ' tools \ build \ b2 toolset = gcc --target-os = qnxnto --build-type = complete stage --with-system'
  • .a文件将位于stage \ libs文件夹
相关问题