title: Build Boost C++ WinCE
body: <p><p>
  I know that are similar question but doesn't help me.
  I want to build boost for Windows CE 6 on an x86 Platform.
  <p></p>
  
  <p>
  I've build STLPort in release moded as shared library for WINCE with success, I've also add some patch and integrate the OpenCE Time library and implemented some missing ANSI C function. STLPort test is ok (just an issue with wcout, wcin and wcerr in_avail() function, I don't know exactly where is the problem).
  </p>
  
  <p>
  To build boost I created a batch file and change the user-config.jam in this way. The build is ok but seems that I'm compiling for my Windows Xp Platform instead of WinCE.
  </p>
  
  <p>
  The boost build system is very complicated and I'm not understanding how it work (the documentation isn't very good and on google there's no much). The build of boost is ok but I cannot run application. It seems that is missing some DLL or that the Boos DLL's are wrong. The message I get when I'm attacched with debugger is "Nessun processo all'estremita' della PIPE" -> "No process at the end of the PIPE". When I try to launch the application from the target device it has no effect. Am I wrong something? How can I tell boost to use specific configuration?
  </p>
  
  <p>
  Another problem is that i cannot see the build log. I don't know what exactly I'm building. Is there a way to see what actually is done?
  </p>
  
  <p>
  The batch file that I call to build boost (I start the shell of Visual Studio 2008):
  </p>
  
  <pre><code>@echo off
  cls
  bjam --with-chrono --with-date_time --with-thread toolset=msvc-CEPlatformName variant=release threading=multi link=shared runtime-link=shared
  </code></pre>
  
  <p>
  This is the user-config.jam located in tools/build/v2
  </p>
  
  <pre><code>using msvc : CEPlatformName:
      &lt;compileflags&gt;-D_CRT_SECURE_NO_WARNINGS
      &lt;compileflags&gt;-D_CRT_SECURE_NO_DEPRECATE
      &lt;compileflags&gt;-DBOOST_PROTO_MAX_ARITY=10
      &lt;compileflags&gt;-DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
      &lt;compileflags&gt;-DBOOST_MPL_LIMIT_METAFUNCTION_ARITY=10
      &lt;compileflags&gt;-D_WIN32_WCE=0x600
      &lt;compileflags&gt;-DUNDER_CE
      &lt;compileflags&gt;-DWINCE
      &lt;compileflags&gt;-Dx86
      &lt;compileflags&gt;-D_x86_
      &lt;compileflags&gt;-D_UNICODE
      &lt;compileflags&gt;-DUNICODE
      &lt;linkflags&gt;/subsystem:windowsce,6.00 
      &lt;linkflags&gt;/MACHINE:X86
      &lt;linkflags&gt;/NODEFAULTLIB:oldnames.lib
      &lt;linkflags&gt;/NODEFAULTLIB:libc.lib
      &lt;linkflags&gt;coredll.lib
      &lt;linkflags&gt;corelibc.lib
      &lt;linkflags&gt;ole32.lib
      &lt;linkflags&gt;oleaut32.lib
      &lt;linkflags&gt;uuid.lib
      &lt;setup&gt;C:/boost_1_53_0/CEPlatformNameConfig.bat.bat
  ; 
  
  
  using stlport : 5.2 :
      C:/celib/stlport/stlport :
      C:/celib/stlport/bin 
  ;
  </code></pre>
  
  <p>
  And this is the script file for configuration
  </p>
  
  <pre><code>@echo off
  echo CONFIGURAZIONE PER LA COMPILAZIONE DI BOOST SU WINCE
  echo.
  
  rem ------------------------------------------------------------
  set BOOST_DIR=c:\boost_1_53_0\boost
  set PLATFORM=CEPlatformName
  set TARGETCPU=x86
  set OSVERSION=WCE600
  set STLPORT_DIR=C:\celib\stlport
  set STLPORT_INC=%STLPORT_DIR%\stlport
  set STLPORT_LIB=%STLPORT_DIR%\bin\%PLATFORM%
  rem ------------------------------------------------------------
  
  if not %1==%&amp;TARGETCPU% goto error
  
  echo Setting Boost directory to %BOOST_DIR%
  echo Setting OS Platform to %PLATFORM%
  echo Setting target CPU to %TARGETCPU%
  echo Setting OS Versione to %OSVERSION%
  echo Setting STLPORT_INC to %STLPORT_INC%
  echo Setting STLPORT_LIB to %STLPORT_LIB%
  
  rem settin visual studio 2008 variable path
  set SDKROOT=C:\Programmi\Windows CE Tools
  
  set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_cex86;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
  set PLATFORMROOT=%SDKROOT%\%OSVERSION%\%PLATFORM%
  set INCLUDE=%STLPORT_INC%;%PLATFORMROOT%\include\;%PLATFORMROOT%\include\%TARGETCPU%;%VCINSTALLDIR%\ce\include;%VCINSTALLDIR%\ce\atlmfc\include;%VSInstallDir%\SmartDevices\SDK\SQL Server\Mobile\v3.0;
  set LIB=%STLPORT_LIB%;%PLATFORMROOT%\lib\%TARGETCPU%;%VCINSTALLDIR%\ce\ATLMFC\LIB\%TARGETCPU%;%VCINSTALLDIR%\ce\LIB\%TARGETCPU%
  
  echo PATH at %PATH%
  echo.
  
  echo INCLUDE is %INCLUDE%
  echo.
  
  echo LIB is %LIB%
  echo.
  
  goto exit
  
  :error
  echo Invali Target CPU
  goto exit
  
  :exit
  echo impostazioni avvenute con successo
  </code></pre>
  
  <p><b>EDIT</b>
  <p>Seems that the compileflags in the user-config.jam has no effect... or better seems that the user-config.jam has no effect <p></p>
  
  <p><b>EDIT 2</b>
  I've found an issue</p>
  
  <pre><code>using msvc : CEPlatformName :
          &lt;compileflags&gt;-D WINCE
  </code></pre>
  
  <p>The issue is that this instruction does not define anything. I've also tried</p>
  
  <pre><code>using msvc : CEPlatformName :
          &lt;compileflags&gt;/D_CRT_SECURE_NO_WARNINGS
  </code></pre>
  
  <p>But the result is the same.</p>