Skip to content

Including clay modules

Minthos edited this page Dec 21, 2010 · 5 revisions

As an example, we have a file /clay/libs/myownlib/test.clay that we want to include in our program.

In the source: import myownlib.test.*;

When compiling: 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

Clone this wiki locally