On Mon, 17 Sep 2001, Frank Heckenbach wrote:
Prof. A Olowofoyeku (The African Chief) wrote:
And how can I force GPC to link only to static libraries?
-static
When building GPC, pass it in CFLAGS to make, when compiling programs with GPC, just give it on the command line.
Ok, thanks. Presumably, this means that the binaries will then become much bigger.
Sure.
Bigger, of course (on the order of a few hundred KB)....
Can be much more. Take the classic "hello world" as an example:
size in bytes after using strip dynamic linking: 503014 165904 static linking 2379490 579220
Since this is more than you'd expect for such a simple program, I think the problem is the linker - although you have less overhead with static linking ( hence faster ), the linker does not know how to omit unused library code.
Russ