The following instructions only apply to a Ubuntu Linux system.

1. Either install a Linux system natively or install a Virtual machine (VirtualBox) (recommended).
2. Create a new directory called SystemC_learn.
3. cd SystemC_learn
4. Download systemc-2.2.0.tgz into the directory SystemC_learn
5. wget http://www.pfb.no/files/systemc-2.2.0-ubuntu10.10.patch
6. tar -xvf systemc-2.2.0.tgz
7. cd systemc-2.2.0
8. patch -p1 < ../systemc-2.2.0-ubuntu10.10.patch
9. sudo mkdir /usr/local/systemc-2.2
10. mkdir objdir
11. cd objdir
12. sudo ../configure --prefix=/usr/local/systemc-2.2
13. sudo make
14. sudo make install

15. export SYSTEMC_HOME=/usr/local/systemc-2.2/

This, however will disappear on the next login. To permanently add it to your environment, alter ~/.profile or~/.bash_profile if it exist. For system wide changes, edit /etc/environment. (newline with expression:SYSTEMC_HOME=”/usr/local/systemc-2.2/“)

16. To compile a systemC program simply use this expression:

g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux -o sim hello.cpp -lsystemc -lm

the example code:
// All systemc modules should include systemc.h header file
#include "systemc.h"
// Hello_world is module name
SC_MODULE (hello_world) {
SC_CTOR (hello_world) {
// Nothing in constructor
}
void say_hello() {
//Print "Hello World" to the console.
cout << "Hello World.\n";
}
};

// sc_main in top level function like in C++ main
int sc_main(int argc, char* argv[]) {
hello_world hello("HELLO");
// Print the hello world
hello.say_hello();
return(0);
}