GCC for RISC OS

From RISC OS

(Difference between revisions)
Jump to: navigation, search
Line 19: Line 19:
* [http://www.riscos.info/downloads/gccsdk/latest/cmunge.zip CMunge], a module header creation tool (CMHG clone).  
* [http://www.riscos.info/downloads/gccsdk/latest/cmunge.zip CMunge], a module header creation tool (CMHG clone).  
-
== Tutorials and Examples ==
+
== RISC OS GCC Tutorials and information ==
-
Now you can try the [[GCC tutorial]] or read the accompanying documentation inside the !gcc application, which shows you some simple examples of creating RISC OS applications and RISC OS modules.
+
* [[C in RISC OS]].
 +
* [[GCC tutorial]]
 +
* [[GCC processor|GCC processor target options]]
 +
* [[UnixLib|Using UnixLib]]
-
More information can be found under [[C in RISC OS]].
+
In addition, the !gcc application itself contains a number of examples (inside !gcc.examples).
 +
 
 +
== Distributing GCC compiled programs ==
 +
 
 +
When you distribute a GCC compiled program and are using the SharedCLibrary as runtime library (i.e. using option <tt>-mlibscl</tt>),  then no additional support files need to be made available with your program.
 +
 
 +
On the other hand when you are using UnixLib as runtime library (and that's the default runtime library), then an up-to-date version of some UnixLib support modules need to be used together with your program.  The following is an overview of these support modules :
 +
 
 +
* SharedUnixLibrary module (mandatory) : http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
 +
* Digital Renderer module (only needed when your code is using the OSS sound interface via the /dev/dsp device) : http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
 +
* Iconv module (only needed when your code is using iconv routines, note temporary separate A9 home version) : http://netsurf.sourceforge.net/iconv/
 +
* CryptRandom module (only needed when random data is read via /dev/(u)random device) : http://www.markettos.org.uk/
 +
* !UnixHome application (typically required by some ported Unix programs wishing to store configuration files and settings in the Unix user's home directory) : [http://www.riscos.info/unix/downloads/support/UnixHome-1.03.zip !UnixHome]. The !UnixHome application should be 'seen' by the RISC OS Filer before they can make use of it.
 +
 
 +
The modules SharedUnixLibrary, Digital Renderer, Iconv and CryptRandom will be RMEnsure'd with their minimal needed version number by the UnixLib code at the moment their functionality is needed.  Appropriate error message will be returned when these modules are not available or when they do not have a sufficent high enough version number.
 +
 
 +
When you distribute a copy of these UnixLib support modules with your program, please also mention the URLs in documentation and/or installation notes or program where up-to-date versions can be found.
== Useful programs ==
== Useful programs ==

Revision as of 02:09, 7 October 2006

Contents

Using GCC under RISC OS

Setup

GCC is very easy to setup on RISC OS. The following is what you need to get started with a fully working C compiler.

Additional languages and tools

You may also wish to install one or more of the following components as well :

RISC OS GCC Tutorials and information

In addition, the !gcc application itself contains a number of examples (inside !gcc.examples).

Distributing GCC compiled programs

When you distribute a GCC compiled program and are using the SharedCLibrary as runtime library (i.e. using option -mlibscl), then no additional support files need to be made available with your program.

On the other hand when you are using UnixLib as runtime library (and that's the default runtime library), then an up-to-date version of some UnixLib support modules need to be used together with your program. The following is an overview of these support modules :

The modules SharedUnixLibrary, Digital Renderer, Iconv and CryptRandom will be RMEnsure'd with their minimal needed version number by the UnixLib code at the moment their functionality is needed. Appropriate error message will be returned when these modules are not available or when they do not have a sufficent high enough version number.

When you distribute a copy of these UnixLib support modules with your program, please also mention the URLs in documentation and/or installation notes or program where up-to-date versions can be found.

Useful programs

The following list contains useful programs helping you to develop with GCC on RISC OS :

  • Sourcery : Sourcery will manage the source code that makes up a project but it will also manage the various resources files that are required to produce a RISC OS application. These include Sprite, Message and Template files.

Links

Personal tools