Why would it be impossible to fully statically link an application?

后端 未结 2 1450
花落未央
花落未央 2021-02-01 07:44

I\'m trying to compile a statically linked binary with GCC and I\'m getting warning messages like:

warning: Using \'getpwnam_r\' in statically linked application         


        
2条回答
  •  清酒与你
    2021-02-01 08:39

    AFAIK, it's not impossible to fully statically link an application.

    The problem would be incompatibility with newer library versions which might be completely different. Say for example printf(). You can statically link it, but what if in a future that printf() implementation changes radically and this new implementation is not backward-compatible? Your appliction would be broken.

    Please someone correct me if I'm wrong here.

提交回复
热议问题