pbc icon indicating copy to clipboard operation
pbc copied to clipboard

Arm 平台WP8 编译pbc报错

Open lovoror opened this issue 11 years ago • 3 comments

#ifndef _LUA_PBC_EXTRA_H_
#define _LUA_PBC_EXTRA_H_

#if defined(_USRDLL)
#define LUA_EXTENSIONS_DLL _decispec(dllexport)

#else
#define LUA_EXTENSIONS_DLL
#endif

#ifdef __cplusplus
extern "C"{
#endif

    #include "lauxlib.h"
    int LUA_EXTENSIONS_DLL luaopen_protobuf_c(lua_State *L);

#ifdef __cplusplus
}
#endif
#endif // _LUA_PBC_EXTRA_H_

在链接时找不到符号 luaopen_protobuf_c

请问如何破解?

lovoror avatar Nov 25 '14 15:11 lovoror

确认工程包含了含有 luaopen_protobuf_c 的源文件。如果你的编译器需要用 _decispec(dllexport) 指定导出符号, 那么请加上。

cloudwu avatar Nov 26 '14 02:11 cloudwu

VS2012
Preprocessor-> Preprocessor Definitions中的设定为

_USRDLL;WP8;_WP8;_EXPORT_DLL_;%(PreprocessorDefinitions)

为wp8编译,依然报

error C2065: 'dllexport' : undeclared identifier    

需要其他设置吗?

lovoror avatar Nov 26 '14 03:11 lovoror

谢谢云风,已经解决,是工程的问题,直接用了win32的工程

lovoror avatar Nov 27 '14 02:11 lovoror