testStaticBlock.cc  :  static variable declared inside a block
testStaticFunc.cc   :  static variable declared inside a function

testStaticInt.cc    :  static variable declared outside all functions,
                       with internal linkage

testStaticExt.cc
gFunc.cc            :  static variable declared outside all functions,
                       with external linkage

To compile

c++ -Wall -o testStaticBlock testStaticBlock.cc
c++ -Wall -o testStaticFunc  testStaticFunc.cc
c++ -Wall -o testStaticInt   testStaticInt.cc
c++ -Wall -o testStaticExt   testStaticExt.cc gFunc.cc

alternatively, to compile one file at once:
c++ -Wall -c testStaticExt.cc
c++ -Wall -c gFunc.cc
c++ -Wall -o testStaticExt2  testStaticExt.o gFunc.o

alternatively, to compile using a static library:
c++ -Wall -c gFunc.cc
ar -r libgFuncS.a gFunc.o
c++ -Wall -o testStaticExtS  testStaticExt.cc -L. -lgFuncS

alternatively, to compile using a dynamic library:
c++ -Wall --shared -o libgFuncD.so gFunc.cc
c++ -Wall -o testStaticExtD  testStaticExt.cc -L. -lgFuncD

alternatively, to compile using only dynamic libraries:
c++ -Wall --shared -o libTest.so   testStaticExt.cc
c++ -Wall --shared -o libgFuncD.so gFunc.cc
c++ -Wall -o testStaticExtA  dummy.cc -L. -lgFuncD -lTest

--- C++0x declarations - tested on gcc 4.4.1 ---

autod.cc  :  declaration of variable with automatic type determination
dtype.cc  :  declaration of variable with the same type as another

To compile

c++ -Wall -std=c++0x -o autod autod.cc
c++ -Wall -std=c++0x -o dtype dtype.cc
