2

I've heard that strip is a program that makes an executable smaller.

I've tried to turn it on from my compiler (for Python) but when it comes to run strip I just see "strip is not recognized as a command or as a program" error from the Command Prompt.

So where do I get the executable of strip for Windows?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
kettlepot
  • 10,574
  • 28
  • 71
  • 100

3 Answers3

4

strip is part of GNU's binutils.

R Samuel Klatchko
  • 74,869
  • 16
  • 134
  • 187
3

Strip removes information such as debugging symbols from object files. Doing this makes the file smaller.

If you have it, it would likely be distributed with your C compiler (such as GCC).

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
silentbicycle
  • 1,164
  • 6
  • 9
  • The executables pyInstaller (the compiler I'm using) makes 6 MB executables even out of the smallest program.. that's why I'd like to make it weight less. I've already tried UPX but didn't make it so light. – kettlepot Oct 08 '09 at 21:22
  • @terabytest see link in my answer to the StripReloc site - using exe compressors can have some very annoying side effects. – fvu Oct 08 '09 at 21:28
3

Unix/Linux style strip will remove symbol info that is used for debugging purposes. AFAIK under Windows a strip utility is specific to the compiler that was used. See here on SO for more info.

A related utility that might be useful is StripReloc, a utility that removes relocation info from executables and as such makes them smaller. Read the instructions though, it's not recommended to run it blindly against every .exe on your system...

Community
  • 1
  • 1
fvu
  • 32,488
  • 6
  • 61
  • 79