qt 中直接使用 c 语言文件,c 文件可以直接包含,h 文件包含的时候,需要在 c++ 中添加额外信息,如下:
#ifdef __cplusplus extern "C" { #include "c头文件.h" #endif #ifdef __cplusplus } #endif
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3