title: Building Boost 1.52 with non-standard location of MinGW
body: <p>I tried to build Boost from source for 64bit using MinGW (x64) but failed when creating the bjam.exe. Any pointer to help is appreciated. Thanks.</p>
  
  <ul>
  <li>Package: Boost 1.52.0 (download from sourceforge, C:\BoostSrc)</li>
  <li>Package: MinGW-w64 (4.7.2-x64 rubenvb, C:\MinGW\rubenvb-4.7.2-64)</li>
  </ul>
  
  <p>I created the following batch file to ensure repeatable building, but things got wrong. I cannot build the bjam.exe with supplied batch file. I'm not using the supplied "bootstrap.bat" as the non-standard installation path of MinGW (I have multiple mingw sets), and I have no MSVC installed in my machine</p>
  
  <pre><code>SET BOOST_VER=boost_1_52_0
  SET PATH_MINGW=C:\MinGW\rubenvb-4.7.2-64
  SET PATH_BJAM=%~dp0\%BOOST_VER%\tools\build\v2\engine
  SET PATH="%PATH_MINGW%\bin"
  PUSHD "%PATH_BJAM%"
  
  REM check path
  mingw32-make -version
  
  REM error below
  build.bat mingw --toolset-root=%PATH_MINGW% --show-locate-target
  
  SET PATH=%OPATH%
  POPD
  REM ... some more ...
  </code></pre>
  
  <p>Error message</p>
  
  <p>gcc: error: CreateProcess: No such file or directory</p>
  
  <p>When I type the command directly from command prompt (set the path, go to location and invoke build.bat), it goes smoothly (with warnings which i think can be ignored)</p>