Build Boost C++ WinCE

亡梦爱人 提交于 2019-11-30 10:16:41

I've found the problem
I'm finally build boost.chrono boost.date_time boost_system and boost.thread fow Windows CE 6.0 on a custom x86 target.

I've changed user-config.jam in this way

using msvc : 9.0~CEPlatformName : "C:\...\cl.exe" :
    <compileflags>-D_CRT_SECURE_NO_WARNINGS
    <compileflags>-D_CRT_SECURE_NO_DEPRECATE
    ...
    <setup>CEPlatformNameConfig.bat
;

in this way the bjam call the correct batch file for configure the build system. If the compiler is not specified bjam will call vcvarsall.bat and the compiler flags will be ignored.
Now the bjam call is:

bjam ... toolset=msvc-9.0~CEPlatformName ...

It's also important to correctly define the `x86` and `_X86_`. Note that `X86` will casue STLPort to assume wrong directory for ANSI C library files.

But I've an Issue on boost::this_thread::sleep_for() function. I know that boost use TLS for this operation and I know that TLS is not fully implemented in WinCE. I can replace this function with a simple ::Sleep() of the Win32 Library.
I'm only sure the WinCE has `TlsAlloc()`, `TlsFree()`, `TlsGetValue()` and `TlsSetValue()` functions, and has at least `TLS_MINIMUM_AVAILABLE` slot for TLS that is defined at least to 64.

Finaly I'm able to build Boost.Thread Boost.System Boost.Chrono Boost.DateTime Boost.Regex in debug and release mode.

The issue is according to this port (http://stackoverflow.com/questions/16016637/boost-c-and-windows-ce-6-0) that WinCe doesn't support long names. DLL name's can be larger then 32 chars.

The same problem of name length caused this_thread::sleep_for to don't work.

Thanks for all people the helped me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!