Portable Object Compiler
The Portable Object Compiler, a language and a runtime library for producing C programs that operate by the runtime conventions of Smalltalk 80 in a UNIX environment, as described in Brad Cox's book on Objective-C or in his Producer paper.
Objective-C and Smalltalk 80 offer Object Oriented Programming in which data, and the programs which may access it, are designed, built and maintained as inseparable units called objects.
The Portable Object Compiler is backed by a library which supports Smalltalk 80's interpretation of messaging; binding of a message to its target routine is done at run time. This library contains a growing number of primitive class definitions, such as an Object class whose abilities are inherited by every object in the system, and provides many, but not all, capabilities of Smalltalk. The language provides features such as Blocks, also known as enclosures.
The software has been ported to many flavors of UNIX and non-UNIX operating systems, with, as the name suggests, a special emphasis on portability. Ports exist for Solaris SPARC, IBM AIX PowerPC, DEC Alpha, HP-UX PA-RISC and HP-UX IA-64, Silicon Graphics IRIX MIPS and many other processors.
The compiler is compatible with, and can be used with many different C compilers, such as lcc,tcc,gcc,Intel icc,Sun cc, clang and great variety of other C compilers in order to generate optimal code for each specific platform and purpose.
For Solaris either download our IPS repository (pkg install objc after pkg set-publisher -p /export/ips-objc-repo) or download the old-style SVR4 packages :
Here are some precompiled (binary) installation packages for Linux and BSD :
- Solaris 11.4 IPS repository ips-objc-repo.tar.gz (for SolarisStudio 12.6 on Solaris 11.4)
- Solaris 11.3 (or Solaris 11.4) SVR4 pkgadd package SUNWobjc-3.3.6.i386.tar.gz (for SUN cc 5.13, Solaris 11.3 generic 32-bit or 64-bit, works on both 64bit and 32bit).
- Solaris 11.3 (or Solaris 11.4) SVR pkgadd package SUNWobjc-3.3.6.x86_64.tar.gz (for SolarisStudio 12.4 or DeveloperStudio 12.6, Solaris 11.3 64-bit only).
On Linux or UNIX systems, you should install the sources of the software as follows :
- Obtain a copy of 'gcc' or use the C compiler 'cc' of your specific system (depending on the system you use, the native 'cc' may be better or worse than gcc)
- Compile flex-2.5.4 if you don't have flex; don't use lex
- Compile BSD byacc 1.9.1 (and install as 'byacc', bison could be used as alternative, but I recommend byacc)
- Install a binary version of the Portable Object Compiler (see the packages above) or, on other platforms, where there is no binary package available, build objc-bootstrap-3.3.4.tar.gz. The compiler is written in itself, so you need a bootstrap (binary or source) compiler to start.
- Install objc-3.3.6.tar.gz.
- Optionally, for the class browser, install cursel-0.2.4.tar.gz.
The package contains the documentation in HTML format. The manual is also available here, and there's a note on Objective-C blocks. The text Objective-C for Unix is also a source of information on the architecture of the compiler.
Metalab : http://metalab.unc.edu/pub/Linux/devel/lang/objc/.
More Objective-C packages can be found at Metalab : http://metalab.unc.edu/pub/Linux/devel/lang/objc/.
CheezMUD, a MUD written in Objective-C, is not in the /devel/lang/objc directory, but rather in http://metalab.unc.edu/pub/Linux/games/muds/.
Richtext is an X11 / Motif / Lesstif text editor (and RTF file previewer) written in Objective-C and available at http://metalab.unc.edu/pub/Linux/apps/editors/X/.
Here's a screenshot of the Richtext previewer/editor on Slackware (or FreeBSD) with a KDE desktop and another screenshot on Solaris 11 (with a GNOME desktop).