为什么使单元静止使内部链接

时间:2018-11-29 06:59:17

标签: c++ compilation static linkage translation-unit

我了解到使某些内容静态化会导致内部链接,而其他翻译单元则无法访问该符号。谁能解释为什么将其设为静态?是从标准还是某种语言技巧中使静态声明不可见的变量?

1 个答案:

答案 0 :(得分:0)

Chain FORWARD (policy ACCEPT) target prot opt source destination DOCKER-USER all -- anywhere anywhere DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhereACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere 可能会造成混淆,因为根据上下文,它具有一些不同的含义。在上下文中,这意味着定义的变量仅在当前翻译单元中可见:

driver failed programming external connectivity on endpoint gogs (b62814647bf440e923c009da0ca76185fac2f89a9534eb11792dbcb07ef3ffbf):  (iptables failed: iptables --wait -t filter -A DOCKER ! -i br-5dd41982af68 -o br-5dd41982af68 -p tcp -d 172.18.0.6 --dport 3000 -j ACCEPT: iptables: No chain/target/match by that name.