0

I am trying to install Boost 1.66 alongside MinGW 7.2 on Windows 10.

I tried running boostrap.bat mingw as well as the bootstrap gcc present at C:\Program Files\boost_1_66_0\tools\build\src\engine

I am getting this as a result:

C:\Program Files\boost_1_66_0\tools\build>bootstrap gcc
Bootstrapping the build engine

Failed to bootstrap the build engine
Please consult bootstrap.log for furter diagnostics.

And the bootstrap.log file looks like:

###
### Using 'gcc' toolset.
###

C:\Program Files\boost_1_66_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap 

C:\Program Files\boost_1_66_0\tools\build\src\engine>md bootstrap 

C:\Program Files\boost_1_66_0\tools\build\src\engine>gcc -DNT -o bootstrap\jam0.exe  command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.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 pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 

C:\Program Files\boost_1_66_0\tools\build\src\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= "  clean 
...found 1 target...
...updating 1 target...
...updated 1 target...

C:\Program Files\boost_1_66_0\tools\build\src\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= "  
...found 161 targets...
...updating 3 targets...
[MKDIR] bin.ntx86_64
[COMPILE] bin.ntx86_64\b2.exe
gcc: error: command.c: No such file or directory
gcc: error: compile.c: No such file or directory
gcc: error: constants.c: No such file or directory
gcc: error: debug.c: No such file or directory
gcc: error: debugger.c: No such file or directory
gcc: error: execcmd.c: No such file or directory
gcc: error: frames.c: No such file or directory
gcc: error: function.c: No such file or directory
gcc: error: glob.c: No such file or directory
gcc: error: hash.c: No such file or directory
gcc: error: hcache.c: No such file or directory
gcc: error: headers.c: No such file or directory
gcc: error: hdrmacro.c: No such file or directory
gcc: error: jam.c: No such file or directory
gcc: error: jambase.c: No such file or directory
gcc: error: jamgram.c: No such file or directory
gcc: error: lists.c: No such file or directory
gcc: error: make.c: No such file or directory
gcc: error: make1.c: No such file or directory
gcc: error: mem.c: No such file or directory
gcc: error: object.c: No such file or directory
gcc: error: option.c: No such file or directory
gcc: error: output.c: No such file or directory
gcc: error: parse.c: No such file or directory
gcc: error: pathsys.c: No such file or directory
gcc: error: regexp.c: No such file or directory
gcc: error: rules.c: No such file or directory
gcc: error: scan.c: No such file or directory
gcc: error: search.c: No such file or directory
gcc: error: subst.c: No such file or directory
gcc: error: w32_getreg.c: No such file or directory
gcc: error: timestamp.c: No such file or directory
gcc: error: variable.c: No such file or directory
gcc: error: modules.c: No such file or directory
gcc: error: strings.c: No such file or directory
gcc: error: filesys.c: No such file or directory
gcc: error: builtins.c: No such file or directory
gcc: error: class.c: No such file or directory
gcc: error: cwd.c: No such file or directory
gcc: error: native.c: No such file or directory
gcc: error: md5.c: No such file or directory
gcc: error: modules\set.c: No such file or directory
gcc: error: modules\path.c: No such file or directory
gcc: error: modules\regex.c: No such file or directory
gcc: error: modules\property-set.c: No such file or directory
gcc: error: modules\sequence.c: No such file or directory
gcc: error: modules\order.c: No such file or directory
gcc: error: execnt.c: No such file or directory
gcc: error: filent.c: No such file or directory
gcc: error: pathnt.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.

    "gcc"   -o bin.ntx86_64\b2.exe "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DNT" "-DYYSTACKSIZE=5000" "-pedantic" "-fno-strict-aliasing" "-s" "-O3" "-Wno-long-long" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules\set.c" "modules\path.c" "modules\regex.c" "modules\property-set.c" "modules\sequence.c" "modules\order.c" "execnt.c" "filent.c" "pathnt.c" 

...failed [COMPILE] bin.ntx86_64\b2.exe...
...skipped bjam.exe for lack of b2.exe...
...failed updating 1 target...
...skipped 1 target...
...updated 1 target...

C:\Program Files\boost_1_66_0\tools\build\src\engine>exit /b 1 

Can I get some help in installation please?

noobita
  • 67
  • 11

1 Answers1

1

It looks like you are building from the wrong directory: ~\boost_1_66_0\tools\build instead of ~\boost_1_66_0

The answer here describes how to build boost using MinGw towards the end.

kenba
  • 4,303
  • 1
  • 23
  • 40
  • Hi! Thanks for the help. Can you also tell me how to link all the boost files at once? Right now, I am linking them one by one, for e.g.: g++ test.cpp -std=c++14 -I %boost% "C:\Boost\stage\lib\libboost_regex-mgw72-mt-x64-1_66.a" "C:\Boost\stage\lib\libboost_regex-mgw72-mt-d-x64-1_66.a" "C:\Boost\stage\lib\libboost_regex-mgw72-mt-d-x32-1_66.a" – noobita Feb 08 '18 at 10:15
  • @GauravSaini, if you are using `cmake` take a look at the `CMakeLists.txt` file [here](https://github.com/kenba/via-httplib). If you are using `qmake` then try the `.pro` files and `boost_libs.pri` file [here](https://github.com/kenba/via-httplib/tree/master/examples) – kenba Feb 08 '18 at 18:52
  • Thanks a lot, sir. My Issue has been resolved. The issue was with my cmd autorun script, g++ was making the bin folder on desktop instead of the boost folder, which was the root cause of No such file error. I changed it back to original and solved the issue. For the linker issue, I started using Code::Blocks. It is way easy to just put linker arguments once and then use them forever. Lastly, thanks a lot. Your answer helped a lot! :) – noobita Feb 09 '18 at 07:21