0

Last year Boost (from the modular boost git repository) could be built in Windows using these steps.

I got quite far almost a year later, using this recipe:

  1. Install MinGW (32-bits) and Msys (bash etc) using mingw-get-setup
  2. Install the Windows Driver Kit (for W7 I used WDK 7 -- GRMWDK_EN_7600_1.ISO), which provides MASM 8 (needed for boost > 1.51 according to this post)
    -downloading the ISO image and extracting the files with WinRAR worked for me
    -the installer advises against installing the DSF, so skip that
    -add the directories of ML64.exe and ML.exe to the path (both required)
    C:\Windows\WinDDK\7600.16385.1\bin\x86\amd64; C:\Windows\WinDDK\7600.16385.1\bin\x86
  3. Install a 64/32-bit compiler as well (I used TDM gcc 5.1.0-2) and
    add its bin/ directory to the Windows path
  4. open cmd.exe as administrator and start bash
  5. in the parent dir of boost, run
    git clone --recursive https://github.com/boostorg/boost.git boost > clone.log
  6. exit bash, goto directory boost and run:
    bootstrap gcc
  7. in project-config.jam, change using msvc ; into using gcc ;
  8. run:
    b2 headers (now needed to make symbolic links)
    b2 -a -d+2 -q --build-type=complete --build-dir=build toolset=gcc link=shared runtime-link=shared threading=multi

These options to b2 worked with previous versions of boost, but now I can only compile with b2 without options. The full command line returns these errors:
undefined reference to __imp_make_fcontext and
undefined reference to __imp_jump_fcontext.

I cannot find other posts or even web pages that describe these errors. Does anyone know a way in Windows to still use the b2 options for the latest boost from the GitHub repository?

EDIT:

Using b2 -a -d+2 -q --build-dir=build toolset=gcc works. Apparently the --build-type=complete option is the first of the ones above to break the compilation.

The flags link=shared, runtime-link=shared and threading=multi also cause b2 to stop.

Has anyone got a clue how to solve this? is there a patch for MinGW that works for the current repositories?

Community
  • 1
  • 1
alle_meije
  • 1,892
  • 15
  • 35

1 Answers1

1

Your best bet may be switching to MSYS2 which is a new and improved version of MSYS. I have very good experience with MSYS2 whereas I can't say that about MSYS or Cygwin (In my case that's building a project heavily using boost and c++11).

You can read some comparison here.

Also taken from the answer here:

While MSYS isn't dead, I would say it's not looking very healthy either.

Community
  • 1
  • 1
doqtor
  • 8,058
  • 2
  • 15
  • 30
  • Fantastic -- so in MSYS2 it is not even necessary to compile boost? That's even better (as I don't plan to do boost development if I don't need to)! – alle_meije Jul 12 '15 at 21:16
  • There is prebuilt boost and many others, use `pacman -Ss ` to query. – doqtor Jul 12 '15 at 21:28