首页 > 其他分享 >MinGw编译Boost

MinGw编译Boost

时间:2023-06-15 23:02:36浏览次数:36  
标签:src gcc Boost bootstrap modules 52 编译 MinGw boost


MinGw编译Boost

(金庆的专栏)

在MinGw Shell中运行bootstrap.sh失败

Jinq@jinqing-pc /d/src/boost_1_52_0
$ bootstrap.sh toolset=gcc
Building Boost.Build engine with toolset gcc...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
 


bootstrap.log显示如下: 


###
### Using 'gcc' toolset.
###
rm -rf bootstrap
mkdir bootstrap
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c
builtins.c:33:23: 致命错误:sys/wait.h:No such file or directory
编译中断。
execunix.c:17:26: 致命错误:sys/resource.h:No such file or directory
编译中断。
fileunix.c:98:17: 致命错误:ar.h:No such file or directory
编译中断。 



按照 http://lists.boost.org/boost-users/2011/06/69016.php 

解决如下: 

Jinq@jinqing-pc /d/src/boost_1_52_0/tools/build/v2/engine
$ ./build.sh mingw
Jinq@jinqing-pc /d/src/boost_1_52_0/tools/build/v2/engine/bin.ntx86
$ cp b2.exe /d/src/boost_1_52_0
Jinq@jinqing-pc /d/src/boost_1_52_0
$ b2 toolset=gcc stage



按照 https://svn.boost.org/trac/boost/ticket/4884#comment:10
可能正确的方法是在cmd.exe窗口中运行bootstrap.bat来生成b2.exe.
不过这样就需要另外设置gcc的路径。
bootstrap.sh是不支持在MinGW Shell中运行的。

标签:src,gcc,Boost,bootstrap,modules,52,编译,MinGw,boost
From: https://blog.51cto.com/u_16162321/6495504

相关文章

  • Linux编译Windows共享目录下代码
    Linux编译Windows共享目录下代码(金庆的专栏)万神服务器代码是跨平台的。平时策划在Windows上开自己的服务器测试,测试和发布服务器为Linux.开发时,先在Windows上编译测试,再到Linux上编译测试。因为用VC开发,可以使用VAssist,MetalScroll工具辅助,开发效率......
  • 用boost::bind构造boost::coroutine
    classTestCoro{...typedefboost::coroutines::coroutione<void()>Coro; voidCoroFun(Coro::caller_type&ca);Corom_coro;};TestCoro::TestCoro(){m_coro=Coro(boost::bind(&TestCoro::CoroFun,this,_1));}可......
  • C#将字符串编译成程序集并执行
    实现将字符串编译为代码并在程序中使用,实际应用可将字符串保存在文件中,程序启动后读取文件中字符转换为代码执行,这样只需要修改文件不改动代码就可以增删或修改程序功能,提高程序的灵活性。例如,要实现下面的代码:usingSystem;namespaceTestSpace{classTest{......
  • (2023.6.15)linux下can的调试工具交叉编译
    //源码包路径:https://public.pengutronix.de/software/libsocketcan/libsocketcan-0.0.11.tar.bz2https://public.pengutronix.de/software/socket-can/canutils/v4.0/canutils-4.0.6.tar.bz2//编译命令./configure--host=arm-linux-gnueabihf--prefix=/home/fangzeli/work/......
  • 编译时去除未使用的依赖库
    如下,--no-as-needed会把所有指定的库标记为NEEDED,即使没用到;--as-needed会忽略没用到的库;$cc-Wl,--no-as-neededxx.c-ldl-lz-lm-lpthread$ldda.outlinux-vdso.so.1(0x00007fffc03d1000)libdl.so.2=>/lib/x86_64-linux-gnu/libdl.so.2......
  • cryptopp 交叉编译
    1、下载地址https://www.cryptopp.com/#download2、解压后进入对应目录3、执行:exportCXX=aarch64-linux-gnu-g++   说明:aarch64-linux-gnu-g++为交叉编译器4、执行:exportCXXFLAGS="-O2-fPIC-pipe-Wall-shared"   说明:这样得到的静态库和动态库会比不执行此步......
  • wsl编译android13源码并刷入pixel6
    wsl编译环境环境依赖参考编译android10时设置的环境https://www.cnblogs.com/revercc/p/16826591.html,这里注意wsl使用的ext4文件系统,此文件系统区分大小写,而windows由于历史原因使用的是NTFS文件系统,此文件系统默认是不区分大小写的。所以在wsl的共享目录中需要开启区分大小写......
  • 编译make 4.2.1
    下载源码https://mirrors.tuna.tsinghua.edu.cn/gnu/make/make-4.2.1.tar.gz编译并安装tarxzvfmake-4.2.1.tar.gzcdmake-4.2.1./configure--prefix=/home/wangyuan/soft//*如果当前系统中没有安装make/./build.sh/如果安装了make*/make./makeinstall错误解决......
  • XGBoost超参数调优指南
    本文将详细解释XGBoost中十个最常用超参数的介绍,功能和值范围,及如何使用Optuna进行超参数调优。对于XGBoost来说,默认的超参数是可以正常运行的,但是如果你想获得最佳的效果,那么就需要自行调整一些超参数来匹配你的数据,以下参数对于XGBoost非常重要:etanum_boost_roundmax_dep......
  • CUDA编译设置
    CUDA版本和GPU卡的对应关系,以及编译设置:Fermi (CUDA3.2untilCUDA8) (deprecatedfromCUDA9):SM20orSM_20,compute_30–Oldercardssuchas GeForce400,500,600,GT-630Kepler(CUDA5andlater):SM30orSM_30,compute_30–Keplerarchitecture(ge......