log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
- RISC OS London Show Report 2024 (News:1)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Is GCC close to the ANSI standard C++?
 
  Is GCC close to the ANSI standard C++?
  Gulli (15:36 8/6/2001)
   (16:55 8/6/2001)
     (21:26 8/6/2001)
   (10:07 12/6/2001)
 
Gulli Message #4771, posted at 15:36, 8/6/2001
Unregistered user The lack of an up to date C++ compiler for RISC OS has been criticised here on the IconBar forums and on some other discussion mediums like forums, mailing lists etc. and no one has objected to that until now. So therefore I ask these questions:

Is GCC close to the ANSI standard C++?
What is lacking?
Is that being addressed?
Installation instructions - are they included?
What libraries are included?
Are they close to the ANSI standard?
What WIMP class libraries should be used with it (open for debate I know)?
Where can they be obtained?

Just a few questions to throw around. If there are more questions about the GCC compiler, I guess this is one place to ask them.

[Edited by Gulli at 16:47, 8/6/2001]

  ^[ Log in to reply ]
 
johnstlr Message #4772, posted at 16:55, 8/6/2001, in reply to message #4771
Unregistered user

Is GCC close to the ANSI standard C++?

AIUI it's as good as anything else out there. The full ANSI C++ standard is extensive to say the least and even fully developed compilers (ie MS VC++) still lack various features.

The thing to note about GCC though is that it isn't (and probably never will be) validated against the ANSI C++ test suites as it'd cost too much.


What is lacking?

Not sure, but if I was to hazard a guess I'd say that potential problems may occur with templates (although AIUI GCC has extremely good support for these) and perhaps run time type information. I only suggest these areas as they're areas in which commerical compilers stuggle as well. I'm sure someone will correct me.


Is that being addressed?

GCC is being constantly developed by the open source community - I don't think you can say fairer than that.


Installation instructions - are they included?

AIUI they're pretty poor on RISC OS and a complete step by step guide needs to be written. I've recently ordered a machine that can run GCC so when it arrives, and I find some time to play, maybe I could write some for the iconbar or something (always assuming I can get it working).


What libraries are included?

None. Libraries that are available include Unixlib which implements a subset of useful unix calls and it can output code that can be linked with the SharedCLib. I'm not sure about the C++ libraries or the STL.


Are they close to the ANSI standard?

Well, the SharedCLib is. UnixLib isn't meant to implement the ANSI libraries. I would guess that any STL port would be close as it's likely to be based on something like STLPort from SG or something.


What WIMP class libraries should be used with it (open for debate I know)?

As far as I'm aware there aren't any really aimed at GCC. The only one with any pretense at development now seems to be RiscGuiLib. However it's slow going due to lack of time and people (unfortunately I don't know enough about WIMP programming to really contribute)


Where can they be obtained?

RiscGuiLib is at

http://www.ph.ed.ac.uk/~rab/ro-guilib/

Other,unsupported libraries with source code available include

Dreamscape

http://www.argonet.co.uk/users/mseaborn/dscape/dscape.html

and there used to be one called Blue but the CFSFC site seems to have disappeared.

  ^[ Log in to reply ]
 
davidm Message #4773, posted at 21:26, 8/6/2001, in reply to message #4772
Unregistered user AFAIK GCC for RISC OS comes with an STL implementation. I haven't really used it very much so can't comment on the speed of it or any problems associated.

Personally I have never had problems installing and setting up GCC. It really is pretty simple... the only thing to be aware of with the versions currently available is that you should get pre-release 2 if you wish to build C++ apps (there are some weak link issues IIRC). Pre-release 3 works fine with C apps though. I don't know if this issue has been addressed in the SDK as I haven't got a machine setup at home where I could build a version :-(

Hopefully new binary versions will be forthcoming. There's a more recent build of UnixLib on Peter Naulls' site :
http://chocky.mine.nu/unix/

The only major trouble with C++ with GCC on RISC OS is the amount of RAM gobbled up and th time taken to build - these are hardware issues and not related to the port. If you can cross compile a big C++ app it is highly recommended that you do so unless you want a long wait...

  ^[ Log in to reply ]
 
hubersn Message #4774, posted at 10:07, 12/6/2001, in reply to message #4771
Unregistered user I just did a quick web search for compiler conformance testing, and there was an interesting article available for reading online. Look at

[link removed]

There are also some comparison tables available at

[link removed]

You can easiliy see that GCC is quite good at conforming to the ISO C++ standard, at least the compiler. I know that the library (STL) got a lot better since that comparison.

GCC is under constant development, both Cygnus and the Open Source community are spending significant amounts of development time to bring GCC forward. The RISC OS community directly benefits from that by "just" porting the latest versions.

There should be a new, big version of GCC soon - GCC 3.0, which includes a much better preprocessor and a more standard compliant library (especially STL).

Now back to our current GCC version. First of all I would suggest to download GCC prerelease 2 (for C++) and 3 (for C).

[link removed]

It is really easy to install, but it is not that easy to use (command line only). You can download an easy-to-use GUI frontend for GCC from

[link removed]

You will need either the SharedCLibrary stub from the GCC homepage or UnixLib (UnixLib is needed for C++ STL usage).

WIMP libraries are a bit difficult at the moment. There are a few C++ libs out there like Dreamscape and RiscOopLib, but most people seem to use OSLib and build their own libraries. The only library currently in development is RiscGuiLib.

One thing should be clear: GCC is our only hope for C++ development on RISC OS, so please if you have some development time free, help those GCC porters (especially Nick Burrett), the UnixLib developers (especially Peter Naulls and John Tytgat) and the RiscGuiLib guys (Andre Schaefer, Colin Granville, Uwe Kall etc).

[Edited by rich at 22:06, 31/3/2019. Some links point to site that's now a payday loans company; others now dead]
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Is GCC close to the ANSI standard C++?