Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
50 user(s) are online (41 user(s) are browsing Forums)

Members: 2
Guests: 48

samo79, Lio, more...
Support us!
Recent OS4 Files
OS4Depot.net





Can we use any C++11 features with the latest GCC?
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2177
I've built a GCC cross-compiler, and was hoping to at least use C++11 smart pointers and/or some C++11 features that don't require an updated stdlib. However, when I use -std=C++11, I get whole pages of errors in the header files, e.g.:
/usr/local/amiga/adtools-ppc-cyg64-20170623-404/ppc-amigaos/include/c++/5.4.0/bits/basic_string.hIn function ‘long long int std::__cxx11::stoll(const string&, std::size_t*, int):
/
usr/local/amiga/adtools-ppc-cyg64-20170623-404/ppc-amigaos/include/c++/5.4.0/bits/basic_string.h:5274:31error‘strtoll’ is not a member of ‘std’
   
{ return __gnu_cxx::__stoa(&std::strtoll"stoll"__str.c_str(),


Yes, errors in the compiler's stdlib header files...

Has anyone else had more success? If so, how did you get it working? It's getting rather frustrating not being able to use newer C++ functionality.

Hans


P.S., Anyone know how to build the *.lha archive for the native GCC when built from the adtools source? Compilation completed, but I've got no idea how to transfer a fully working compiler to my AmigaOS machine.

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: Can we use any C++11 features with the latest GCC?
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 713
What commands you have given so far when building the native compiler?

I don't recall using any C++11 features succesfully yet. Maybe you can borrow smart pointers from boost as a workaround?

   Report Go to top

Re: Can we use any C++11 features with the latest GCC?
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1649
@Hans

Use -std=gnu++11 instead of -std=c++11.

The latter defines __STRICT_ANSI__ which disables newlib functions that are not standard ANSI.

   Report Go to top

Re: Can we use any C++11 features with the latest GCC?
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2177
@salass00

The -std=gnu++11 works! Well, it compiles; I haven't tested the binary yet. Thanks for that.

Now, if only I could figure out how to package and install the native GCC that I built...

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project