这是什么意思?GCC编译解决方法
这是什么意思?GCC编译
错误: expected identifier or ‘(’ before string constant
指向的这一行 extern "C" BOOL GetLastError(int *pInt_SysError = NULL); 这个是我写的一个SO,然后导出的函数。
编译gcc Test.c -L ../e_Core/bin -le_Core
BOOL 是我在其他地方定义的一个int 变量 。最开始已经加载了这个定义的头文件
#include "Comm.h" BOOL 所在头文件
#include "1.h" GetLastError所在头文件
int main()
{
.....
}
------解决方案--------------------
gcc中没有
extern "C"
你要用
#ifdef __cplusplus括起来
还有c里不支持默认参数(int *pInt_SysError = NULL)
错误: expected identifier or ‘(’ before string constant
指向的这一行 extern "C" BOOL GetLastError(int *pInt_SysError = NULL); 这个是我写的一个SO,然后导出的函数。
编译gcc Test.c -L ../e_Core/bin -le_Core
BOOL 是我在其他地方定义的一个int 变量 。最开始已经加载了这个定义的头文件
#include "Comm.h" BOOL 所在头文件
#include "1.h" GetLastError所在头文件
int main()
{
.....
}
------解决方案--------------------
gcc中没有
extern "C"
你要用
#ifdef __cplusplus括起来
还有c里不支持默认参数(int *pInt_SysError = NULL)