I am trying to use Boost for Windows phone 8 (or 8.1). How can I build and generate boost libraries to be used by Windows Phone?
1 Answers
Boost contains many libraries, some of which use banned APIs not allowed in Windows Phone. Here is a list of all the valid Phone APIs. Whether or not you can use an individual Boost library on Windows Phone will depend.
For header file only libraries, assuming there are no banned APIs in use, you don't need to do anything different from using in any other C++ Windows application. Just setup header file include path.
I've recently added a feature to Boost.Build to help targeting Windows Store and Phone applications. When building you can use windows-api=phone to specify you want to target Windows Phone. To see how to build Boost in general, take a look a previous question. Just like with a header file only library, if any banned APIs are in use you won't be able to use unless you replace the API in the sources. For example the following command can be used to build for the ARM architecture targeting Windows Phone 8.0:
b2 toolset=msvc-11.0 variant=release architecture=arm windows-api=phone

- 1
- 1

- 1
- 1