ScriptInterface.h
extern "C"
{
#include "kel.h"
#include "process.h"
#if defined(SIMULATOR_COMPILE_FROM_SCRIPTINTERFACE) || defined(SIMULATOR_WIN)
#include "sigtypes.h"
#endif
}
在Windows平台中,这不会出现任何错误(代码如下)
xyz.cpp
#include "kel.h"
#include "process.h"
#include "sigtypes.h"
#include "ScriptInterface.h"
它正在给出符号查找错误'在Linux平台上。外部' C'是否有任何不同的行为?在Linux平台上?
答案 0 :(得分:0)
_Z16KEL_MEM_AllocateP19KEL_MEM_tPoolHandlej
是一个非常严重的名称,几乎可以肯定,因为您在kel.h
区块的之外包含了extern "C"
。
摆脱xyz.cpp
中的前三个包含,只使用ScriptInterface.h
中包含的内容(标记为非重复)。