tags:

views:

778

answers:

3

What does it take to get C++ tr1 members (shared_ptr especially, but we'd like function and bind and ALL the others) working with GCC 3.4.4 (for the Nokia N810 tablet computer).

Has anyone done this? Attempted this?

It may not be feasible for us to upgrade to GCC 4.x to cross-compile for this device (but if you've done that, we'd love to know).

There may be many approaches, and I'd like to avoid dead ends others have hit.

We're trying to avoid bringing in boost, since it can be pretty interdependent (you bring in one boost header and you end up with 20 more), and keeping code size down is important to us.

Thank you!

+1  A: 

Are you able to use Boost (Smart Pointers, Bind, Function) directly? From the GCC changelogs, the actual std::tr1 stuff is only available from 4.0 onwards. :-(

I know there are differences between the Boost and std::tr1, but hopefully these can be worked around satisfactorily. Let me know how it works for you. :-)

Chris Jester-Young
A: 

On a different topic, I'm installing the g++-3.4 package on my Ubuntu laptop now, and I'm going to see if I can compile libstdc++ from the Subversion trunk on it. If so, I'll let you know! (If not, I'll let you know too. :-P)

Chris Jester-Young
Well, you didn't let anyone know eventually, did you? ;-)
Elazar Leibovich
+3  A: 

For shared_ptr from boost, at least, the number of dependencies is pretty small. You can use bcp to extract subsets from boost as well, so you don't need the whole of boost to compile your application.

Jan de Vos