|
- A Logic Circuit Simulation Library in C++
|
This page details instructions for building, installing and using the latest release of libLCS, libLCS-0.0.3. 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 could 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.
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 the file build.sh. This file is small build script to build a static library for libLCS. You might have to make this file an executable with the following command:
After making the file an executable, type the following command to build the static library (this should be done in the same directory where you have unzipped the libLCS-0.0.3 release file).
Once the script runs successfully, you should find a static library file libLCS.a in the same directory where you have executed the script.
There are no special steps required to install the library once it has been successfully built. However, 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 libLCS-0.0.3). On most linuxes, this should be /usr/include/
. Similarly, copy the newly built static library file libLCS.a to the standard linker path. On most linuxes, this should be /usr/lib/
.
Once you have built and installed the static library and header files for libLCS-0.0.3, 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. This should typically be done by passing a command line argument -lLCS to the linker.
Copyright © 2006, 2007 Siva Chandra