关于C++写C接口

需求描述:php 用C++写一些API,内部实现是用C++作的,但对外暴露的API是纯C的。spa 方法简单描述:code 1)定义API的头文件,不要#include任何C++相关的东西,好比#include <string>get 2)定义API的头文件,以 string #ifdef __cplusplus extern "C" { #endif开始,以 #ifdef __cplusplus
相关文章
相关标签/搜索