Reduce static library size

Started by skirby, April 16, 2007, 11:47:20 AM

Previous topic - Next topic

skirby

Hello,

I have created a static library in order to make a test.
When I open my library into and hexadecimal editor, I can see informations like this:
C:\Documents and Settings\xxx\Desktop\PellesCStaticLibrary\output\main.obj
C:\Documents and Settings\xxx\Desktop\PellesCStaticLibrary\main.c

I would like to know if there is a way (compiler option / optimization) which could delete these entries in order to make the library size decrease?


Thanks in advance and have a nice day.

frankie

If you have included debug info's remove them.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

skirby

Hello frankie,

I have no debug information.
I have done a test with VS C++ 2005 and it also include informations like filenames inside the library.

Is it normal?

frankie

Yes it is normal, the name of a library object member is the file name.
If this is a problem maybe you can 'touch' the library file, but this requires knowledge of archive format.
If you are interested look for a copy of the paper describing PE and COFF format on msdn (look for some pecoff_vxx.doc'.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide