Here is my simple C++ program:
#include "lua.hpp"
int main(int argc, char** argv)
{
using namespace std;
lua_State* VM = lua_open();
}
Here are my errors:
C:/Dev-Cpp/lib/liblua5.1.a(lauxlib.o)(.text+0x12a4):lauxlib.c: undefined reference to `__errno'
C:/Dev-Cpp/lib/liblua5.1.a(lauxlib.o)(.text+0x13e8):lauxlib.c: undefined reference to `__getreent'
C:/Dev-Cpp/lib/liblua5.1.a(lauxlib.o)(.text+0x14b8):lauxlib.c: undefined reference to `__getreent'
C:/Dev-Cpp/lib/liblua5.1.a(lauxlib.o)(.text+0x151e):lauxlib.c: undefined reference to `__getreent'
C:/Dev-Cpp/lib/liblua5.1.a(lauxlib.o)(.text+0x1654):lauxlib.c: undefined reference to `__getreent'
C:/Dev-Cpp/lib/liblua5.1.a(lobject.o)(.text+0x13a):lobject.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(ldo.o)(.text+0xdf):ldo.c: undefined reference to `setjmp'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0x65):llex.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0x4f5):llex.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0x51c):llex.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0x555):llex.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0x961):llex.c: undefined reference to `_imp___ctype_'
C:/Dev-Cpp/lib/liblua5.1.a(llex.o)(.text+0xb5b):llex.c: more undefined references to `_imp___ctype_' follow
It's like the C runtimes aren't being linked or something.
Can anyone help?
PS: (It works normally, but when I include lua it gives the above errors)