NO

Author Topic: Reduce static library size  (Read 4885 times)

skirby

  • Guest
Reduce static library size
« 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.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1917
Re: Reduce static library size
« Reply #1 on: April 16, 2007, 01:48:53 pm »
If you have included debug info's remove them.

skirby

  • Guest
Re: Reduce static library size
« Reply #2 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?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1917
Re: Reduce static library size
« Reply #3 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'.