Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:24:28+00:00 2026-06-08T08:24:28+00:00

I am using luabind for binding my C++ classes to lua, I can get

  • 0

I am using luabind for binding my C++ classes to lua, I can get luabind and most lua functions to work, but if I try to use luaL_openlibs() I get:

undefined reference to 'luaL_openlibs'
collect2: ld returned 1 exit status

if I add -llua to the linker I get:

 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x15c): multiple definition of 'lua_gettop'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000253.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x170): multiple definition of 'lua_settop'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000296.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x244): multiple definition of 'lua_pushvalue'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000278.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x274): multiple definition of 'lua_type'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000307.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x388): multiple definition of 'lua_touserdata'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000306.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x414): multiple definition of 'lua_pushnil'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000274.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x42c): multiple definition of 'lua_pushnumber'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000275.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x450): multiple definition of 'lua_pushinteger'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000271.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x46c): multiple definition of 'lua_pushboolean'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000268.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x85c): multiple definition of 'lua_concat'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000235.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x8e8): multiple definition of 'lua_pushlstring'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000273.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x97c): multiple definition of 'lua_error'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000240.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0xb5c): multiple definition of 'lua_pcall'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000267.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0xbdc): multiple definition of 'lua_pushcclosure'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000269.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0xf98): multiple definition of 'lua_pushstring'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000276.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x104c): multiple definition of 'lua_settable'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000295.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x10d4): multiple definition of 'lua_rawgeti'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000282.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x111c): multiple definition of 'lua_rawget'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000281.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x1278): multiple definition of 'lua_objlen'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000266.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x12ec): multiple definition of 'lua_tolstring'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000302.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x1368): multiple definition of 'lua_tointeger'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000301.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lapi.o):lapi.c:(.text+0x13a4): multiple definition of 'lua_tonumber'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000303.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lstate.o):lstate.c:(.text+0xf4): multiple definition of 'lua_close'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000234.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lauxlib.o):lauxlib.c:(.text+0x40): multiple definition of 'luaL_newstate'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000219.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lauxlib.o):lauxlib.c:(.text+0x20c): multiple definition of 'luaL_loadfile'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000216.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lauxlib.o):lauxlib.c:(.text+0x5e0): multiple definition of 'luaL_unref'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000229.o):(.text+0x0): first defined here
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../liblua.a(lauxlib.o):lauxlib.c:(.text+0x664): multiple definition of 'luaL_ref'
 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libluabindd.dll.a(d000226.o):(.text+0x0): first defined here
 collect2: ld returned 1 exit status

I built luabind myself because I could find no prebuilt mingw binaries.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:24:29+00:00Added an answer on June 8, 2026 at 8:24 am

    I figured it out.

    The problem was that I was linking to lua in a static library. I ended up downloading http://sourceforge.net/projects/luabinaries/files/5.1.4/Windows%20Libraries/lua5_1_4_Win32_dllw4_lib.zip, rebuilding luabind to link to that, and setting my project to link to it also.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems making Lua & Luabind work under Windows 7 using VS 2010.
I am using luabind and I want to make this lua code work. print(hello..welcome
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using the HTML5 File API I can get the Binary String representation of a
I am using Luabind to expose a base class from C++ to Lua from
I am currently having problems using Luabind to interface a Lua scripted AI with
I'm trying to export a simple class to Lua using LuaBind. I took the
I've discovered while trying to use a luaBind-style class binding system that passing pointers
I'm using Luabind to integrate LUA into one of my projects, and the following
I am using luabind as my lua to C++ wrapper. Luabind offers a method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.