I've succefully built STLPort and Boost c++ for Windows CE 6.0. I can run application with Windows CE 6 and STLPort both in debug end release mode.
I've built boost with the following batch file:
@echo off
cls
:build
:release
echo building boost in release shared library
bjam ^
--with-system ^
--with-chrono ^
--with-date_time ^
--with-thread ^
--with-atomic ^
toolset=msvc-9.0~CEPlatform ^
variant=release ^
threading=multi ^
stdlib=stlport-5.2.1 ^
link=shared ^
runtime-link=shared
:debug
echo building boost in debug shared library
bjam ^
--with-system ^
--with-chrono ^
--with-date_time ^
--with-thread ^
--with-atomic ^
toolset=msvc-9.0~CEPlatform ^
define=_STLP_DEBUG=1 ^
variant=debug ^
threading=multi ^
stdlib=stlport-5.2.1 ^
link=shared ^
runtime-link=shared
goto exit
:exit
pause
I've modified the user-config.jam accordin to this link: [http://stackoverflow.com/questions/15906901/build-boost-c-wince/15939679#15939679][1]
I can run application with boost in release mode with some issue:
boost::this_thread::sleep_for(boost::chrono::seconds(1));will cause the application to crash in release mode: I cannot the application if the previous statment is not present. Seems that some dependency are lost. I've used Dependency walker and all dependency are resolved (COREDLL.DLL, STLPORT.5.2.DLL, BOOST_SYSTEM-VC90-MT-P-1_53.DLL, BOOST_THREAD-VC90-MT-P-1_53.DLL, BOOST_DATE_TIME-VC90-MT-P-1_53.DLL).
In debug mode things are worst: I cannot launch the application if I include a boost header (boost/thread.hpp, boost/chorono.hpp). Seems again that some dll are missing but with dependency walker all seems ok. No missing DLL... The linked DLL are: COREDLL.DLL, STLPORTSTLD.5.2.DLL, BOOST_SYSTEM-VC90-MT-GDP-1_53.DLL, BOOST_THREAD-VC90-MT-GDP-1_53.DLL, BOOST_DATE_TIME-VC90-MT-GDP-1_53.DLL
Am I missing something. Does someone have an idea?
CE has a limit of 32 characters DLL name length when loaded with implicit loading. Crazy that this still isn't fixed in CE (let alone a proper error message) nor worked around in Boost. The approach we took at work was to use 'bsystem' instead of 'boost_system' (similarly "bthread", "bregex" etc) #ifdef UNDER_CE. Maybe we also removed the "-mt", since single-threaded code isn't supported under CE, but I'd have to check the sources.
The options maybe have been changed by later version of boost. I use --layout=system option and BOOST_AUTO_LINK_NOMANGLE macro, and they work.
I'm using boost 1.55.