Skip to content

Compiling a dll on stable-x86_64-pc-windows-gnu fails to link functions correctly #87

@bpglaser

Description

@bpglaser

When compiling a dll via cargo targeting stable-x86_64-pc-windows-gnu the linker fails to include the correct functions. Instead it only links lua funcitons in the dll.

I came across this when trying to compile the as-lua-lib example. The resultant dll only contains functions prefixed with "lua_", "luaL_", or "luaopen_". Notably missing is the "luaopen_mathx" function required for requiring the library from lua.

I can confirm that the same setup does indeed correctly link when the lua crate is omitted from the compilation. Likewise, the functions are included when compiling with the stable-x86_64-pc-windows-msvc target.

gist example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions