title: Compile Boost 1.47 for Windows CE
body: <p>There is actually a bit of information out there about people trying to build the Boost libraries for Windows CE, but no one has reported success or even given the steps required to do so. With the two latest releases (1.46 and 1.47) the release notes have mentioned that one of their test compilers was "Visual C++, Windows Mobile 5, with STLport: 9.0," which seems to imply that success has been achieved (as a side note the compiler given is interesting since the latest STLPort I've been able to download is 5.2.1. Am I missing something?).</p>
  
  <p>The posts I've found seem to revolve around the file contained here: <a href="http://www.boost.org/development/tests/trunk/VeecoFTC.html">http://www.boost.org/development/tests/trunk/VeecoFTC.html</a>. The thing is, I honestly don't know how to use it. I was able to build STLPort for Windows CE, but following the Boost Getting Started guide ( <a href="http://www.boost.org/doc/libs/1_47_0/more/getting_started/windows.html">http://www.boost.org/doc/libs/1_47_0/more/getting_started/windows.html</a>) I get stuck at the Boost.Build stage. Do I need to configure at this point to compile for CE? I just don't know what steps to take and would appreciate some guidance.</p>
  
  <p>These are the steps I have followed so far:</p>
  
  <ol>
  <li>Compile STLPort for Windows CE (documentation was pretty decent, this didn't prove too difficult).</li>
  <li>Install Boost.Build according to Getting Started Guide. I'm a little shaky on this step, since the bootstrap.bat file seems to be specific to "ntx86" and "ntx86_64." Have I already screwed up?</li>
  </ol>
  
  <p>At this point, assuming I've done things correctly, I need to run b2 with something like</p>
  
  <pre><code>b2 --build-dir=build-directory toolset=toolset-name --build-type=complete stage
  </code></pre>
  
  <p>I assume my build directory is the prefix I used for Boost.Build, the build type and stage will remain as given, but I don't know what toolset name to use. The VeecoFTC file has multiple entries for msvc and stlport. I removed the two entries that DIDN'T relate to "wm5," but when I compile with the following command</p>
  
  <pre><code>b2 --build-dir=C:\boost-build toolset=msvc --build-type=complete stage
  </code></pre>
  
  <p>I get a bunch of errors like:</p>
  
  <pre><code>compile-c-c++ C:\boost-build\boost\bin.v2\libs\regex\build\msvc-9.0~wm5~stlport5.2\debug\threading-multi\has_icu_test.obj
  The system cannot find the path specified.
  </code></pre>
  
  <p>Indeed, that file does not exist, but has_icu_test.obj.rsp exists there. Am I missing something? Am I even on the right track?</p>
  
  <p>UPDATE:</p>
  
  <p>Since I can't get Boost.Build to work and am getting no love on the Boost.Build mailing list, I've moved on to trying the CMake build system for Boost: <a href="http://gitorious.org/boost/cmake">http://gitorious.org/boost/cmake</a> . I'm using this in conjunction with CEgcc (I'm much more familiar with Linux than Windows) and I'm running into the following error:</p>
  
  <pre><code>boost/config/requires_threads.hpp:47:5: error: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
  </code></pre>
  
  <p>-mthreads is part of the C and CXX flags-- the problem is that BOOST_PLATFORM_CONFIG is not defined by boost/config/select_platform_config.hpp. What should this be defined to for Windows CE? I figured it should be boost/config/platform/win32.hpp (which would then define BOOST_HAS_WINTHREADS, which would solve the above error). How can the release notes claim this works when select_platform_config.hpp doesn't seem to handle Windows CE cases? If BOOST_PLATFORM_CONFIG does indeed need to be boost/config/platform/win32.hpp, then I need to define either _WIN32, <strong>WIN32</strong>, or WIN32. My first reaction is that none of these should be used for compiling for CE. Also, the VeecoFTC file doesn't contain any of these. How does IT work?</p>