Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
112 user(s) are online (103 user(s) are browsing Forums)

Members: 1
Guests: 111

davec555, more...

Support us!

Headlines

 
  Register To Post  

Can we use any C++11 features with the latest GCC?
Home away from home
Home away from home


See User information
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.

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Can we use any C++11 features with the latest GCC?
Just can't stay away
Just can't stay away


See User information
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?

Go to top
Re: Can we use any C++11 features with the latest GCC?
Just can't stay away
Just can't stay away


See User information
@Hans

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

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

Go to top
Re: Can we use any C++11 features with the latest GCC?
Home away from home
Home away from home


See User information
@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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project