A
A
Alexander Orlov2014-02-02 16:42:08
Qt
Alexander Orlov, 2014-02-02 16:42:08

Building Boost 1.55.0 with MinGw 4.8 from Qt 5.2?

Standard launch via "bootstrap.bat mingw" doesn't work. Many other options too. Judging by the messages output to the console, an attempt is always made to find the msvc compiler for the assembly, without exception. One gets the feeling that the choice is hardcoded into the script.
The only solution I found on the internet was to edit the $BOOSTDIR/tools/build/v2/engine/build.bat file.
There, before line 93 in the file, insert the line: "cmd /c 'bootstrap.bat mingw'". But somehow it looks very clumsy. Has anyone encountered a similar problem? Is there an adequate solution to it without the need for such "hacking"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Grebenshchikov, 2014-02-03
@alexis031182

Can be built with bjam. To do this, go to the folder "...\boost_1.54.0\tools\build\v2\engine\" and run "build.bat mingw"

ECHO ### You can specify the toolset as the argument, i.e.:
ECHO ###     .\build.bat msvc
ECHO ###
ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin,
ECHO ###     intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11

Then copy bjam.exe to the root of the boost and run:
set MINGW_ROOT_DIRECTORY=C:\Qt\Qt5.1.0\Tools\mingw48_32
set path=%MINGW_ROOT_DIRECTORY%\bin;%path%
bjam --with-system --with-thread --with-date_time --with-regex --with-filesystem --with-serialization --with-signals --with-python toolset=gcc threading=multi link=static runtime-link=static address-model=32 architecture=x86 stage

E
ed1s0n, 2014-02-15
@ed1s0n

I recently compiled (on Windows 7) boost 1.55 with the mingw compiler from Qt 5.2.1. Did everything official. guide www.boost.org/doc/libs/1_55_0/more/getting_started ... (section 5.2.1), for b2 the value is toolset=gcc. Building boost.context (and boost.coroutine, in turn, depends on it) requires MASM (namely, the ml tool). I got it here www.masm32.com/masmdl.htm. Then it turned out that the object file from ml does not understand the mingw linker ((( Here https://svn.boost.org/trac/boost/attachment/ticket... discussion of the problem and the patch itself. Do not forget to write the paths to the tools)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question