Boost logo

Boost :

Subject: Re: [boost] [filesystem, regex, asio] These three libraries successfully ported to Windows Phone 8.1
From: Moshe Rubin (moshe_at_[hidden])
Date: 2015-01-28 09:14:16


On January 27, 2015 09:55 GMT, Paul A. Bristow wrote:

>>> And thank you very much for the improved WinRT support.
>>
>> My pleasure. It was an education for me (in the positive sense of the
>> word!) participating in porting Boost. I will only rest on my laurels
>> once the port authorized by the crew and back in the repository <g>.
>
> I'm pleased to see that Windows Phone developers will now be able to use these Boost libraries.

When we went looking for Boost ports for Windows Phone 8, we had a sinking feeling because no
one had ported any of the libraries to WinRT. Steven Gates of Microsoft took the first step,
and was a great encouragement to me and my company. I'm glad to be able to return the favor
to the Boost project, as we have benefited very much from this excellent collection of libraries.

> I'm also curious to know if you have tried to port the Boost.Math library?
>
> Although it contains a lot of esoteric mathy stuff that are unlikely to be mainstream on a phone
> app, there are also some very simple-to-use statistics stuff that will/should be widely applicable.
>
> Have you tried this yet? Are there any obstacles that you can foresee?

We did not need Boost.Math in our product so I did not look into building it. I'm happy to say that
I just now built it for Windows Phone 8.1 on a Visual Studio 12 2013 system and it compiles and creates
the resulting libs like a pro:

<command>
b2 toolset=msvc-12.0 windows-api=phone architecture=arm link=static --with-math variant=debug debug-store=database debug-symbols=on pch=off cxxflags=-ZW stage
</command>

Libraries created:

(*) libboost_math_tr1-vc120-mt-gd-1_58.lib
(*) libboost_math_tr1f-vc120-mt-gd-1_58.lib
(*) libboost_math_c99-vc120-mt-gd-1_58.lib
(*) libboost_math_c99f-vc120-mt-gd-1_58.lib

The only warning message received, and there are many of these, is LNK4264:

<snippet>
msvc.archive bin.v2\libs\math\build\...\libboost_math_tr1-vc120-mt-gd-1_58.lib
bin.v2\libs\math\build\...\sph_neumann.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
bin.v2\libs\math\build\...\sph_legendre.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
bin.v2\libs\math\build\...\sph_bessel.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
. . .
bin.v2\libs\math\build\...\beta.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
bin.v2\libs\math\build\...\assoc_legendre.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
bin.v2\libs\math\build\...\assoc_laguerre.obj : warning LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
common.copy stage\lib\libboost_math_tr1-vc120-mt-gd-1_58.lib
bin.v2\libs\math\build\...\libboost_math_tr1-vc120-mt-gd-1_58.lib
        1 file(s) copied.
</snippet>

I encountered many of these warnings when building my ported libraries. The online documentation
seems to indicate that this is a recommendation. I can tell you that the ported libraries, with
these warnings, all function correctly with no problems.

In short, it looks like Boost.Math compiles as-is for Windows Phone 8.1.

Moshe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk