2

One question.

Does Boost C++ library works in Android OS?

I know that Android NDK doesn't support all C++ lib's.

Thanks

Dipu KS
  • 63
  • 7
  • It might be helpful to know which version and compiler you are using and if STL is available. – Mike M Mar 05 '14 at 18:20
  • I am using Eclipse IDE with latest Android NDK package for Android app development. – Dipu KS Mar 05 '14 at 19:09
  • 1
    Boost is not a library, but a collection of libraries. Most of them are compilable with the NDK. There was some issue with `Boost.Serialization`, due to the lack of wide chars support in past NDK version, although I don't know what the status of this issue is now. – Igor R. Mar 05 '14 at 20:10

1 Answers1

3

Assuming (from the tag) that you're interested in this particular library, the answer is simple:

Boost spirit (and it's constituent support libraries) is a header only library and is supported as long as pick a compiler that is capable of compiling it.

sehe
  • 374,641
  • 47
  • 450
  • 633
  • ... and a development host with plenty of RAM and some time to kill. Boost spirit is tough on compilers! ;) – marko Mar 05 '14 at 22:01
  • @marko True :) Though c++11 + `BOOST_RESULT_OF_USE_DECLTYPE` + `BOOST_SPIRIT_USE_PHOENIX_V3` + `BOOST_SPIRIT_NO_PREDEFINED_TERMINALS` does wonders. As does [staying away from semantic actions](http://stackoverflow.com/a/8259585/85371) and factoring your grammar well. – sehe Mar 05 '14 at 22:04
  • Semantic actions is the particularly smart bit of Qi. I was getting the long compile times on a relatively small grammar, using clang. It would be much worse with GCC. Things got even more interesting running clang's static analyser on the project. – marko Mar 05 '14 at 23:40
  • @sehe is there any question (with detailed answer) about how to achieve best results in sense of optimality (compilation time, compile time memory, executable size, runtime memory etc.) on SO? – Tomilov Anatoliy Mar 07 '14 at 02:36
  • I think I just summed it up :) I believe I have answered a similar question once, but the summary should be rather apt. There has been some discussion on the mailing list. Invariably, the devs point at the compiler samples for good ideas. – sehe Mar 07 '14 at 02:43