Reputation: 13
I'm having some difficulty with linking against the Lua 5.1 libraries using Code::Blocks and MinGW so that I can work with Lua in C. In code blocks, I have search directories pointing to "C:\Program Files(x86)\Lua\5.1\include" and the similar path ending with "\lib" for linking properties, for the includes and libraries tabs, respectively. I even include "lua51.DLL" and "lua5.1.DLL" in my root folder for the project. The interesting thing is that is works fine for SDL, which follows the same procedures as what I explained just now. I've even tried the "magic" fix of linking against "-llua -lliblua" and it doesn't work. My error is specifically "Main.o: undefined reference to 'lua_dofile'", which I know is a linking error. Can someone walk me through how TI set thing up right?
Upvotes: 1
Views: 1206
Reputation: 9549
Could it be that it's due to it being luaL_dofile instead? Note the capital L after lua.
Upvotes: 2