Hi Lee,

Thanks for the message! I couldn't get the stringstream to work at all, and
when I searched up the errors somebody mentioned that C++11 support was
incomplete in 4.7?

So I then decided to try GCC8 in GCCSDK. This meant I couldn't do my
build/debug cycle in RPCEmu as it needs VFP, but I did get it to compile
once I had altered all references to wchar_t (which is specifically
disabled I noticed in the GCCSDK build). It actually runs pretty well on
RISC OS itself but with one huge caveat. If I throw an exception, in
certain cases it crashes out with a library error. If I throw an exception
of type T and catch *exactly* type T then it works, but if I force the
exception to be caught in a parent function it crashes. I've tried
compiling with and without optimisations but with no luck.

C++ exceptions not handled when building on ARM32 · Issue #785 ·
android/ndk (github.com) <https://github.com/android/ndk/issues/785>

Searching brought up that link, which suggests something very similar. ARM,
armeabi and C++.

Any ideas? Everything else is working that I can see!

Thanks,
Daryl.

On Sun, 28 Feb 2021 at 11:46, Lee Noar <lee.n...@sky.com> wrote:

> On 21/02/2021 23:56, Daryl Dudey wrote:
> > I'm writing a fairly big C++ BASIC style language for Windows & RISC OS
> and I'm trying to cross-compile on Windows and I can't get the
> std::stringstream to not give errors. I had problems with ostream before
> and switched to use regular C I/O functions to get around it.
> >
> > I get various errors including deleted functions errors. I can post the
> output if useful.
> >
> > If I replace it with just std::string or fprintf then it all works, but
> a lot of the code is in 3rd party library stuff I daren't risk changing.
> >
> > Is there anything I can try or do?
> >
> > Thanks,
> > Daryl.
>
> Hi Daryl,
>
> Can you post a reduced example that show the errors that you are seeing?
>
> I'm surprised that you had trouble with ostream as that is paired up
> with the compiler and so its features are matched to what the compiler
> is capable of (rather than 3rd party libraries which may have higher
> expectations from the compiler).
>
> Deleted function errors usually indicate that you're trying to use an
> object in a way that isn't allowed, for example, trying to copy an
> object when the copy constructor has been deleted. The nature of C++
> means you can be copying an object without even realising it, for
> example, by passing an object to a function by value instead of by
> reference.
>
> Lee.
>
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to