Hello, My program won't link when I add the '--whole-program' option with gcc 4.4.6. It compiles fine with 'g++ -o prog prog.cc test1.cc', but reports prog.cc:3: undefined reference to `A::A()' prog.cc:3: undefined reference to `A::~A()' with 'g++ --whole-program -g -o prog prog.cc test1.cc' Is this a c++ issue or something with gcc? BR, Henrik Mannerström test1.h: #ifndef test1_h #define test1_h class A { public: A(); ~A(); }; extern A a; #endif /* test1_h */ test1.cc: #include "test1.h" A::A() {} A::~A() {} prog.cc: #include "test1.h" A a; int main() { }