- A Logic Circuit Simulation Library in C++





Installing and Using libLCS


This page details instructions for building, installing and using the latest release of libLCS. Currently, these instructions are relevant for all linuxes, Cygwin and MinGW/MSYS with GCC-3.4.2 or higher. It should be possible to build the library on other systems with appropriate modifications. If you are able to build the library on systems other than those I have listed above, you are welcome to send me the files/instructions. I shall post them here with due acknowledgements.

Building libLCS

The first step is to download the zip file of the latest libLCS release from here. Next unzip this file in a convenient directory. The contents of the zip file are detailed here. One of the contents is a Makefile. One can use make on this with four possible build options all, lib, examples, and clean. The option all builds a static library for libLCS, and also the examples using this static library. The static library is built into the directory lib (see this), and the examples are built into the directory bin (see this). Using the option lib builds only the static library into the directory lib. Since the examples need the static library to build, the build option examples is same as the build option all. The last possible option clean cleans up the object files, the static library, and the example binaries if previously built.

Installing libLCS

There are no special steps required to install the static library of libLCS once it has been successfully built. However, to begin using it in the easiest way, you will have to move the header files and the static library file to the standard include and linker paths. Copy the directory lcs as it is to the standard include path (lcs is one of the directories packaged into the release zip file of the latest release of libLCS). On most linuxes, this should be /usr/include/. Similarly, copy the newly built static library file lib/libLCS.a to the standard linker path. On most linuxes, this should be /usr/lib/.

Using libLCS

Once you have built and installed the static library and header files for libLCS, you can start using the libray in the usual way. You can find examples of using libLCS here. Do not forget to link to the static library while linking your application which uses libLCS. This should typically be done by passing a command line argument -lLCS to the linker.
Copyright © 2006, 2007 Siva Chandra