So I am trying to set up Lua on Visual C++ 2008 and I keep getting this error:

error C3861: 'luaL_newstate': identifier not found

Here is an example of my code:

#include <iostream>

extern "C"
{
#include "lua.h"
}

using namespace std;

int main(int argc, char* argv[])
{
	lua_State *lvm = lua_open();
	if ( lvm == NULL )
		return 0;

	lua_close ( lvm );

	return 0;
}

Anybody got any ideas?

#include "lauxlib.h"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.