extern "C" 使用情形

作者在 2008-08-22 16:38:15 发布以下内容
If you want to write C++ code,
you cannot simply mix C and C++ directly. To import C code into a C++
project you must prototype them as follows:

extern "C" // c must be a capital C
{
extern void Set_320_200();
extern void Put_Pixel( BYTE Color, WORD x, WORD y );
}

extern "C" EXPORT YourExportedFunction();
如果没有 extern "C" 修饰,输出函数仅仅能从 C++ 代码中调用。
经验 | 阅读 7056 次
文章评论,共0条
游客请输入验证码
浏览1940831次