C++ tr1 on GCC 3.4.4 (for the Nokia N810 tablet computer)

这一生的挚爱 提交于 2019-12-11 03:35:28

问题


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:


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.




回答2:


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. :-)




回答3:


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)



来源:https://stackoverflow.com/questions/131445/c-tr1-on-gcc-3-4-4-for-the-nokia-n810-tablet-computer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!