title: Class member functions definitions in separate libraries, and link dependencies
body: <p>Given a class C defined in C.h, 
  and member functions f1 to fn, and member function g1.</p>
  
  <p>f1..fn's definitions are in f.cpp while g1's is in g.cpp.</p>
  
  <p>f.cpp is linked into lib1.so while g.cpp is linked into lib2.so.</p>
  
  <p>g.cpp depends on C.h,and lib2.so depends on lib1.so.
  But lib1.so doesn't no depend on lib2.so</p>
  
  <p>When I have executable that uses C members except g1() and I try to link it against lib1.so only, the linking fails with unresolved references:</p>
  
  <p>lib1.so : unresolved reference to C::g1()  (which is defined in lib2.so)</p>
  
  <p>If the code in the executable doesn't actually directly use g1, should I be able to have linking independent of lib2 entirely?</p>