SystemC can be installed on a range of operating systems and with various C++ compilers. This section gathers together our experience for both Linux and Windows based systems.
Whatever platform or compiler you are using, make sure you read the INSTALL and RELEASENOTES files which are part of the SystemC distribution.
Linux Install
1. Download systemc-2.3.1.tgz ( accellera.org | SystemC Lib )
2. Uncompress
1 |
gunzip systemc-2.3.1.tgz |
Note: users of the Firefox web browser may find that Firefox itself has uncompressed the file. In that case the previous step may not work – you’ll just have to rename systemc-2.3.1.tgz to systemc-2.3.1.tar and carry on.
3. Untar the file
1 |
tar -xf systemc-2.3.1.tar |
This creates a directory /home/u/freesourcec/systemc-2.3.1 containing all the installation files.
4. Change directory to /home/u/freesourcec/systemc-2.3.1
1 |
cd /home/u/freesourcec/systemc-2.3.1 |
5. Create a directory to which you will install
1 2 |
mkdir objdir cd objdir |
6. Check that g++ is available
1 |
which g++ |
7. If g++ is not available in your path, set the environment variable CXX
cshell syntax:
1 |
setenv CXX /path/to/g++ |
bash syntax:
1 |
export CXX=/path/to/g++ |
8. Run configure by typing:
1 |
../configure |
Note: If you prefer to install to a different location than /home/u/freesourcec/systemc-2.3.1, then type
1 |
../configure --prefix=/my_other_path_to/systemc-2.3.1 |
Note: If you intend to do memory profiling (e.g. with valgrind) then you may prefer to use the pthreads library. The SystemC library can be compiled with QuickThreads (the default) or POSIX Threads (pthreads). pthreads has better tool support for debugging and profiling, but runs slightly slower. To choose pthreads, type
1 |
../configure --prefix=/my_other_path_to/systemc-2.3.1 --enable-pthreads |
9. Run make to create libraries
1 |
make |
Note: “debug” ensures that debugging symbols are included in the library which is useful during development. If you care about debugging within the library, type
1 |
make debug |
10. Do final install
1 |
make install |
Windows Install
1. Download systemc-2.3.1.tgz ( accellera.org | SystemC Lib )
2. Extract this file to C: using e.g. 7-zip
3. Launch Microsoft Visual C++ 2005 Express Edition and open the
systemC workspace:
C:\systemc-2.3.1\msvc80\SystemC\systemc.sln
Note: don’t double-click on it as that may automatically launch the wrong version of VC++, if you have more than one installed
Let the tool convert it to the new project format.
4. Make sure that the Platform SDK is installed (see elsewhere) and
that the paths are in the project settings
i.e.
(i). Tools > Options
Click the Projects Tab
Select VC++ Directories
(ii). Select Executable Files
add
C:\Program Files\Microsoft Platform SDK\Bin
as the first path
(iii). Select Include Files
Set the first path to
C:\Program Files\Microsoft Platform SDK\Include
(iv). Select Library Files
Set the first path to
C:\Program Files\Microsoft Platform SDK\lib
(v). Click OK
5. Select Configuration and Platform
(i) Project -> Property -> Configuration Manager
Configuration : Debug | Release
Platform : Win32 | x64
(ii) Click Close
(iii) Click OK
6. Build Target
(i) Build -> Build Solution