Static libraries

Started by
3 comments, last by antareus 21 years ago
When a static library is linked with a target, do all the symbols get put into the target? Or just the ones the target uses? I read somewhere its only what you use, which seems like it sucks sometimes. I''d like a static lib to put all the symbols into an executable, but it seems like the only way to do this is to actually put it in the exe''s project. If you''re wondering, I use the static library to separate out what the code does, I have one for my Core, I have one for my Framework classes.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Advertisement
Open up your executable in Depends and see what symbols are there
quote:Original post by Zipster
Open up your executable in Depends and see what symbols are there


How do I get it to show the symbols? The static library isn''t listed, just the DLLs. I tried using dumpbin /symbols on the executable but got nothing back.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Now that I think about it, why would it include symbols the target doesn''t use? I would think the linker would be smart enough not to, and I can''t think of a reason why you''d want to... but I''m not too familiar in this area.
Okay, well I WANT all the symbols included so the plugin DLLs can use the high-level abstractions provided by them. I know why it doesn''t do it by default, but it is really silly that HAVE to either make it a DLL that users can lose, specify the symbols explicitly, or put it in the executable project unnecessarily.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement