Including clay modules
Clone this wiki locally
As an example, we have a file /clay/libs/myownlib/test.clay that we want to include in our program.
In the source:
The default search locations are $PREFIX/lib/lib-clay and the current directory
Clay will also search for includes in $CLAY_PATH and the -I argument if supplied
So to compile and run the program, we write:
CLAY_PATH="/clay/libs" clay -run main.clay
To add multiple directories to your $CLAY_PATH, separate them by
: on Unix or by
; on Windows.