-
Notifications
You must be signed in to change notification settings - Fork 0
Install and Use
Assuming you meet the basic build requirements (please refer to the README.md file), building and installing in an UNIX environment should be as easy as follows:
$ make
$ sudo make install
By default the make install command attempts to install the compiler in /opt/lpc/. You can change the install directory by changing the variable INSTALL_DIR in the Makefile.
Important: after installing, make sure to export the environment variable LPC_HOME and give it the same value that what INSTALL_DIR contained at the moment of install.
Important note for MS Windows users: currently, we only support building the compiler using a Cygwin environment. Visual Studio should work, provided a minor change is performed on the source files generated by GNU Bison.
To invoke the compiler to build a sample L+ source code file, use the following command:
$ $LPC_HOME/bin/compiler.sh program.lp
On MS Windows, use the following command:
%LPC_HOME%\bin\compiler.bat program.lp
In both cases, remember to set the LPC_HOME environment variable pointing to the L+ compiler root directory before invoking the compiler script.