Build Boost C++ WinCE

前端 未结 2 1688
感情败类
感情败类 2020-12-30 17:40

I know that are similar question but doesn\'t help me. I want to build boost for Windows CE 6 on an x86 Platform.

I\'ve build STLPort in release moded as sh

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 17:50

    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" :
        -D_CRT_SECURE_NO_WARNINGS
        -D_CRT_SECURE_NO_DEPRECATE
        ...
        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.

提交回复
热议问题