(Difference between revisions)
Jump to: navigation, search
m (Links: Fix dead !System link)
m (Links)
Line 8: Line 8:
* [[C in RISC OS|Compiler/Library combinations]]
* [[C in RISC OS|Compiler/Library combinations]]
* [ !System download] containing the 32-bit SharedCLibrary download
* [ !System download] containing the 32-bit SharedCLibrary module

Revision as of 15:01, 29 April 2018

The SharedCLibrary is a module built into most versions of RISC OS, although on many older machines a newer 32-bit version will be softloaded to allow running of modern applications. It provides standard C functions as per the ANSI standard. The 32-bit version also provides newer C99 functionality. The SharedCLibrary additionally contains some RISC OS specific functions. It is the default library that the Castle (Norcroft) C/C++ compiler targets.

Because of its relatively limited functionality compared to the full set of functions found on UNIX systems, it can make a poor choice to try and use for ported programs, and many original RISC OS programs where the programmer requires more functionality. In these cases, the programmer may use UnixLib, bundled with GCC, which is its default target. Programs compiled with GCC may also target the SharedCLibrary.

In other cases, where the program only requires standard C functions, The SharedCLibrary can create a smaller binary, since programs with UnixLib are presently statically linked, adding around 130KB to the final program. The SharedCLibrary must be used for RISC OS modules written in C.


Personal tools