forcing the linker to add all static libraries code
It's probably not relevant anymore to those who were originally in this "conversation" but for other people (like me) who search this forum for answers:
The problem is of course with all linkers (at least the one I work with - WIN32 - Visual .NET, Unix & Linux - GNU) when using static libraries to create executables or shared libraries (dll/.so).
The linker is not using object files from these static libraries if there is no reference to symbols which are found in these files. Therefore, if a function/global variable is declared, and implemented in a static library, but never used in the objects (which are not found in the static libraries) that forms the executable/shared library (output file), it will not appear in the output linker file.
This is of course a good thing, for most cases, cause it reduces dramatically the size of the output file of the linker.
However, sometimes, like in the cases describe above, we would like to "force" the linker to add this code (I needed it to implement "reflection" for classes by their name). In this case I only found the solution in the Unix/Linux platforms (gcc 3.2) - u can simply use the "-z -allextract" before specifing the static libraries which u need to "force" all its content to be used. Later on u can use "-z -defaultextract" to return the linker to its normal behavior for the following libraries (p.s. when calling the compiler u need to add -XLinker before each of the flags so these options will be sent to the linker - "-XLinker -z -XLinker -allextract").
For some reason I failed to find the same solution in the Visual .NET linker.