Quick start guide
Contents
Getting started with PROSE 0.6.x
This article is written for the impatient among you, who wish to get the PROSE 0.6.x release up-and-running quickly without having to read the documentation. To learn more about the PROSE Programming Language, visit http://prose.sourceforge.net.
Configuring, compiling and installing
Download the latest release from http://sourceforge.net/project/showfiles.php?group_id=50184.
Uncompress and extract the archive:
$ gunzip -c prose-<version>.tar.gz | tar xvf -
Run the configure
script to test for the various features of your platform. By default the software will be installed under the /usr/local directory. If this should be different (for example, /djgpp if you're using DJGPP), you must use the --prefix
option. Run configure --help
for a full list of options available and how to set them.
Note that starting with release 0.6.0, it is possible to enable the register scanning option using --enable-regscan
. This feature is useful for developers and compiles in code that will check for potential memory leaks in your bytecode, due to overwriting or discarding the values of allocated memory pointers (such as byte strings created with reg/copy
). If such a condition is met, the RegisterViolation
error will be generated. There is a performance penalty for enabling this feature, so it is switched off by default. But it is highly recommended that you turn it on at this time, as PROSE is a pre-alpha product of interest only to developers anyway.
$ cd prose-<version> $ ./configure --enable-regscan
Once the configure script has finished, begin compilation:
$ make
When compilation has finished, check that the compilation tests complete without error:
$ make check
If all tests pass, you can now install the product. On many systems, you will need to be a privileged user to install in directories such as /usr/local, for example in UNIX you would use the su
command to switch to the root
user, before the installation will work. If in doubt, refer to your operating system manual.
# make install
What files are installed
The following files will be installed by this release. Note that the prefix /usr/local may have been changed by configure --prefix
.
Binaries | /usr/local/bin/prose /usr/local/bin/prism |
---|---|
Shared libraries | /usr/local/lib/libIvor.so /usr/local/lib/libpal.so /usr/local/lib/libprose.so |
Modules | /usr/local/share/prose/modules/ps_core.so /usr/local/share/prose/modules/ps_core.conf |
Schema | /usr/local/share/prose/schema/00core.schema |
Online manuals | /usr/local/man/man1 /usr/local/man/man3 /usr/local/man/man5 |
Header files | /usr/local/include/prose |
Note that libraries will be created that are appropriate for the platform that PROSE has been configured for. They may be shared objects, static archives, or both.
The header files are only required if you are going to write your own APIs or modules for the PROSE environment.
Preparing your environment
You will need to ensure that the /usr/local/bin directory (or wherever you installed to) is in your PATH
, so that when you type prose
or prism
, the tool can be located. You may also need to ensure that the /usr/local/lib directory is in your LD_LIBRARY_PATH
, and /usr/local/man is in your MANPATH
.
An example of setting these environment variables is given below. Typically you would put these commands in your login script, so that they persist from one login session to the next.
In a Bourne-shell variant:
$ PATH=$PATH:/usr/local/bin $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib $ MANPATH=$MANPATH:/usr/local/man $ export PATH LD_LIBRARY_PATH MANPATH
In a C-shell variant:
% set path=($path /usr/local/bin) % setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib % setenv MANPATH $MANPATH:/usr/local/man
In Windows XP, you can set environment variables by right-clicking on 'My Computer', and choosing Properties -> Advanced -> Environment Variables. You only need to modify the PATH
variable.
Testing your environment
To check the newly installed binaries are working:
$ prose --version $ prism --version
To check the manual pages are working:
$ man pal_intro
Running your first program
Now try out your first program by following the instructions in Running your first program. In release 0.6.x, only the PROSE Assembly Language (PAL) is available, and then only a subset of those instructions. So be aware, it's very low-level programming at this time.
How to uninstall
Should you wish to uninstall PROSE, go back into your build directory and type make uninstall
. The files that were previously installed will now be removed from your system.