Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Add extern C and dllexport for luaopen(). #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions binding/lua53/pbc-lua53.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,13 @@ _add_rmessage(lua_State *L) {
return 0;
}

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
__declspec(dllexport)
#endif
int
luaopen_protobuf_c(lua_State *L) {
luaL_Reg reg[] = {
Expand Down Expand Up @@ -904,3 +911,7 @@ luaopen_protobuf_c(lua_State *L) {

return 1;
}

#ifdef __cplusplus
}
#endif