Running this
Code: Select all
#include <lua.h>
int main(int argc, char* argv[])
{
lua_State* L = lua_open(0);
lua_close(L);
return 0;
}
The guy in the tut says to use extern "C" around your includes but that just gives me a bunch of DIFFERENT errors..obj\Debug\main.o||In function `main':|
C:\Documents and Settings\Ewan\Desktop\Code Blocks\luatest\Lua\main.cpp|5|undefined reference to `lua_open(int)'|
C:\Documents and Settings\Ewan\Desktop\Code Blocks\luatest\Lua\main.cpp|6|undefined reference to `lua_close(lua_State*)'|
||=== Build finished: 2 errors, 0 warnings ===|
Code: Select all
extern "C"
{
#include <lua.h>
}
int main(int argc, char* argv[])
{
lua_State* L = lua_open(0);
lua_close(L);
return 0;
}
Any help would be greatly appreciated||Info: resolving __iob by linking to __imp___iob |
||Info: resolving __pctype by linking to __imp___pctype |
||Info: resolving ___mb_cur_max by linking to __imp____mb_cur_max |
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
fu000001.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'|
fu000004.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'|
fu000005.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'|
fu000006.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'|
fu000008.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'|
nmth000000.o:(.idata$4+0x0)||undefined reference to `__nm___iob'|
nmth000007.o:(.idata$4+0x0)||undefined reference to `__nm___pctype'|
nmth000017.o:(.idata$4+0x0)||undefined reference to `__nm____mb_cur_max'|
||=== Build finished: 8 errors, 18 warnings ===|