Install

From vishap oberon compiler
Revision as of 14:18, 21 September 2015 by Antranigv (talk | contribs) (Created page with "{{language navigation|Install}} This document was written to guide you to install voc on various platforms. <small><em><pre> we assume that you know at least how to work wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Deutsch (de) | English (en) | հայերեն (hy)

This document was written to guide you to install voc on various platforms.

we assume that you know at least how to work with the command line interface :)

Installing on GNU/Linux

We will need GCC, GNU build utilities (gnu make, ldconfig, etc) and git.

first, use git to clone the online repository

git clone https://github.com/norayr/voc.git

then cd into the voc directory that we just cloned

cd voc

If you are on 32bit computer, then run

make -f makefile.linux.gcc.x86_64

If you are on an ARM computer, like Raspberry Pi or Nokia N900, run

make -f makefile.linux.gcc.armv6j_hardfp

for a PowerPC run

make -f makefile.linux.gcc.powerpc

and finally, on 64bit computers just run

make

don't get scared if you see errors, if everything went well, usually the last two lines on the console would be

gcc -shared -o libVishapOberon.so *.o
echo ""/opt"/voc-1.1/lib" > 05vishap.conf

now, we need to install the compiler by running

sudo make install

next we will need to add the voc tools (voc, showdef, ocat) to our shell's path, assuming that you run GNU Bash (check by running echo $SHELL and you should get /bin/bash) just add these two lines to your .bashrc file

PATH=$PATH:/opt/voc/bin
export PATH

on Debian GNU/Linux

on Debian GNU/Linux you might need to install libc6-dev package, usually by running

apt-get install libc6-dev

on Fedora

on Fedora and other RHEL-like systems, you might need to install glibc-devel and glibc-static packages, usually by running

yum install glibc-devel glibc-static

Testing the compiler

Now that we have voc installed, let's test it!

first, enter this using your favorite text editor and save it as Hello.Mod

MODULE Hello;

IMPORT Console;

BEGIN

Console.String("Hello, User!");
Console.Ln

END Hello.

then run

voc -m Hello.Mod

you will see voc live in action :) to run our program, run

./Hello

and we'll see

Hello, User!


Installation on other platforms