- Extract downloaded boost source, e.g.
C:\Program Files\boost_1_59_0
. - Create a folder for Boost.Build installation, e.g.
C:\Program Files\boost-build
. - Create a folder within for building, i.e.
C:\Program Files\boost_1_59_0\build
. - Create a folder for installation, e.g.
C:\Program Files\boost
.
- Open Command Prompt.
- Run
g++ --version
. - If the output contains g++ version number then GCC should be set up properly to run from command line and you can continue.
- Open Command Prompt and navigate to
C:\Program Files\boost_1_59_0\tools\build
. - Run
bootstrap.bat mingw
. - Run
b2 install --prefix="C:\Program Files\boost-build"
. - Add
C:\Program Files\boost-build\bin
to Windows PATH.
- Open Command Prompt and navigate to
C:\Program Files\boost_1_59_0
. - Run
b2 --build-dir="C:\Program Files\boost_1_59_0\build" --prefix="C:\Program Files\boost" toolset=gcc install
- Add include folder, i.e.
C:\Program Files\boost\include\boost-1_59
. - Add linker folder, i.e.
C:\Program Files\boost\lib
. - Link required libraries, e.g.
libboost_regex-mgw48-mt-1_59.a
.
Hi
I have followed all of your suggested proceedures both as user and admin but come up with the following.
am on windows 8.1 boost v 1_73_0 g++6.3.0 (MinGW GCC)
Hope you can help with this problelm
Lawrie
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Program Files\boost_1_73_0\tools\build
C:\Program Files\boost_1_73_0\tools\build>bootstrap.bat gcc
Building the B2 engine..
Using 'gcc' toolset.
C:\Program Files\boost_1_73_0\tools\build\src\engine>g++ -x c++ -std=c++11 -s -O3 -o b2.exe -DNDEBUG builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd
.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp filent.cpp filesys.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam.cpp jambase.
cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp object.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp regexp.cpp rules.c
pp scan.cpp search.cpp jam_strings.cpp subst.cpp sysinfo.cpp timestamp.cpp variable.cpp w32_getreg.cpp modules/order.cpp modules/path.cpp modules/property-set.cpp modul
es/regex.cpp modules/sequence.cpp modules/set.cpp
builtins.cpp: In function 'FILE* windows_popen_wrapper(const char*, const char*)':
builtins.cpp:2487:39: error: '_popen' was not declared in this scope
result = _popen( command, "r" );
^
builtins.cpp: In function 'LIST* builtin_shell(FRAME*, int)':
builtins.cpp:2553:29: error: '_pclose' was not declared in this scope
exit_status = pclose( p );
^
debugger.cpp: In function 'char* debug_string_read(FILE*)':
debugger.cpp:110:33: error: 'strdup' was not declared in this scope
result = strdup( buf->value );
^
debugger.cpp: In function 'void debug_init_handles(const char*, const char*)':
debugger.cpp:1046:43: error: '_fdopen' was not declared in this scope
command_input = _fdopen( read_fd, "r" );
^
debugger.cpp: In function 'void init_parent_handles(HANDLE, HANDLE)':
debugger.cpp:1062:78: error: '_fdopen' was not declared in this scope
command_child = _fdopen( _open_osfhandle( (intptr_t)in, _O_RDONLY ), "r" );
^
execnt.cpp:58:28: fatal error: versionhelpers.h: No such file or directory
#include <versionhelpers.h>
^
compilation terminated.
jam.cpp: In function 'int main(int, char**, char**)':
jam.cpp:200:22: error: 'environ' was not declared in this scope
define use_environ environ
jam.cpp:561:37: note: in expansion of macro 'use_environ'
var_defines( root_module(), use_environ, 1 );
^~~~~~~~~~~
jam.cpp: In function 'char* executable_path(const char*)':
jam.cpp:735:66: error: 'strdup' was not declared in this scope
return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
^
sysinfo.cpp: In function 'unsigned int {anonymous}::std_thread_hardware_concurrency()':
sysinfo.cpp:93:21: error: 'std::thread' has not been declared
return std::thread::hardware_concurrency();
^~~~~~
C:\Program Files\boost_1_73_0\tools\build\src\engine>dir *.exe
Volume in drive C is Windows
Volume Serial Number is B084-B251
Directory of C:\Program Files\boost_1_73_0\tools\build\src\engine
File Not Found
C:\Program Files\boost_1_73_0\tools\build\src\engine>copy /b .\b2.exe .\bjam.exe
The system cannot find the file specified.
Failed to build the B2 engine.
C:\Program Files\boost_1_73_0\tools\build>