c++ - c语言里的 export 和 extern 是用来干嘛的?
怪我咯
怪我咯 2017-04-17 11:27:46
0
2
594

比如说这个
EXPORT extern const char libxbee_revision[];

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
阿神

extern here indicates that const char libxbee_revision[] is defined in another file (usually c/cpp). This way the variable will be available globally. (For example, if there is const char libxbee_revision[] in a.cpp, if b.cpp wants to use this array in a.cpp, just extern const char libxbee_revision[] can be used)

From the writing point of view, EXPORT is a macro. Without looking at the definition of this macro, you don't know what it represents. It is possible that the definition of this macro is empty and only serves to mark the variable.

伊谢尔伦

Please Google "C/C++ export extern" !

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!