NO

Author Topic: Reduce static library size  (Read 5208 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: 2096
Re: Reduce static library size
« Reply #1 on: April 16, 2007, 01:48:53 PM »
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

  • 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: 2096
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'.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide