[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 3.2.2 (OAR build) question



leonp at plris.com wrote:
> 
> Please, describe what is the difference? Please!
> 

If the C++ code is contained in the one file and so has no external 
symbols referenced by the program else where the linker passes over it.

Turn the problem around. Say you have a C++ component in a library with 
static constructors. You would not want it linked in just because it had 
a static constructor. You would only want this to happen when you 
reference it.

If you want the static constructor in the constructor list you will need 
to force the object file into the executable or reference a symbol in it.

Regards
Chris