Using Pict (CSCI 6500/4500)

Pict is installed in the directory /usr/local/bin/pict. You can login to the Linux virtual machine by running:

 

$ ssh pict.cs.rpi.edu

 

To use Pict, you have to set the path of the compiler in your environment, by executing the following command (assuming your environment is bash):

 

pict ~ $ export PATH=$PATH:/usr/local/bin

 

Now you may want to try compiling some examples. The examples  directory is located in /projects/wcl/software/pict/Examples. You can copy some of the examples to your home directory. For example:

 

pict ~ $ cp /projects/wcl/software/pict/Examples/Simple/hello.pi ~
pict ~ $ cd ~
pict ~ $ pict -cc -m32 hello.pi
Hello world

 

You can see the standard output shows "Hello world". Besides, the compiler also produces an executable file called a.out. You can try to execute a.out, and you will see the same result. Of course you can specify the output filename with the option -o. For example:

 

pict ~ $ pict -cc -m32 hello.pi -o hello
pict ~ $ ./hello
Hello world

 

The tutorial is available in the directory /projects/wcl/software/pict/Doc. Take a look at it.


Last modified: Fri Mar 1 00:36:02 EST 2019