--- In [email protected], "kldan_ng" <[EMAIL PROTECTED]> wrote: > > I am working on a Memory Footprint Reduction project. I came > across an idea to disable all printf statements so that less > memory is required. In addition, when there is no single > printf statement, the printf library will not be linked, so > it further reduces the executable size. > Is there an easy way to disable printf in a large project? > In my project, we have thousands of C & C++ files. They > don't have a common included common header. Otherwise, I can > do a #define printf(x) in the common header. <snip>
Substitute the original <stdio.h> with one that defines an empty function for printf() and defined all other functions defined in stdio as usual. Regards, Nico
