Skip to content

fix(compat): duplicate symbol when linking with luajit on windows#81

Merged
Tieske merged 1 commit into
lunarmodules:masterfrom
mrcjkb:mj/push-nporxnzmwnsp
Jan 21, 2026
Merged

fix(compat): duplicate symbol when linking with luajit on windows#81
Tieske merged 1 commit into
lunarmodules:masterfrom
mrcjkb:mj/push-nporxnzmwnsp

Conversation

@mrcjkb

@mrcjkb mrcjkb commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

luaL_testudata and luaL_setfuncs are defined in LuaJIT's lauxlib.h.
When linking luasystem with LuaJIT on Windows, I get:

luajit.lib(lj_api.obj) : error LNK2005: luaL_testudata already defined in 7aad4293ba004fa7-compat.o\r\nluajit.lib(lib_aux.obj) : error LNK2005: luaL_setfuncs already defined in 7aad4293ba004fa7-compat.o
...
fatal error LNK1169: one or more multiply defined symbols found

This PR adds a check to disable the compat symbols if LUAJIT_VERSION is defined.

@Tieske Tieske merged commit dfd0d4b into lunarmodules:master Jan 21, 2026
26 checks passed
@mrcjkb mrcjkb deleted the mj/push-nporxnzmwnsp branch January 21, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants