I really have a problem which I just don't understand why it is there. I want to use LUA as a Scripting language to embed it into C++ applications.
I have downloaded the LUA-binaries (Version 5.2.3 win64 vc12; at the time of writing, the newest).
First I tried out a simple "Hello World" that Looks like this:
main.cpp:
#pragma comment(lib, "lua52") #include <stdio.h> #include "lua.hpp" int main(int argc, char* argv[]) { printf("Hello World of c++\n"); lua_State* L = luaL_newstate(); luaopen_base(L); if (luaL_dofile(L, "test01.lua")) { printf("%s\n", lua_tostring(L, -1)); } lua_close(L); getchar(); return 0; }
test01.lua:
print("Hello World of LUA\n")
As you can see it is a very simple code.
I have edited the include directories to include the Path of the header-files and I have edited the library directories to include the path to the library lua52.lib
.
But for some reason I get the error: "error LNK2019..."
I hope someone knows what to do.
Thanks!