extern C用法
时间: 2023-11-21 08:54:34 浏览: 84
extern c的用法
4星 · 用户满意度95%
extern "C" 是一种C++的语法,用于在C++代码中引用和调用C语言的函数。它的主要作用是告诉编译器,某段代码应该按照C语言的规则进行编译和链接。通过使用 extern "C",可以解决C++编译器的名称修饰导致无法与C语言函数进行匹配的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [extern “C“ 用法详细说明](https://blog.csdn.net/weixin_40593838/article/details/122474117)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [extern “C”的用法](https://blog.csdn.net/aochen3846/article/details/102337047)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文