Pelles C forum

Pelles C => General discussions => Topic started by: skirby on April 16, 2007, 11:47:20 AM

Title: Reduce static library size
Post by: skirby on April 16, 2007, 11:47:20 AM
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.
Title: Re: Reduce static library size
Post by: frankie on April 16, 2007, 01:48:53 PM
If you have included debug info's remove them.
Title: Re: Reduce static library size
Post by: skirby on April 16, 2007, 11:53:12 PM
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?
Title: Re: Reduce static library size
Post by: frankie on April 17, 2007, 10:20:55 AM
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'.