Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.
Moderator: Coders of Rage
Ciidian
Chaos Rift Newbie
Posts: 14 Joined: Mon Nov 03, 2008 4:59 pm
Post
by Ciidian » Wed Nov 12, 2008 11:10 am
Hey I've got a question. I'm just starting to learn to use lua scripts now, but I am having a difficult time when I use them in a C++ project.
I think I have compiled and linked everything correctly, but I keep getting this error:
"14 C:\Dev-Cpp\main.cpp
`luaL_newstate' undeclared (first use this function)"
The only code I enter is this:
Code: Select all
lua_State *L;
L = lua_open();
lua_close(L);
the error is coming up on lua_open(). Is there something I am doing wrong?
Falco Girgis
Elysian Shadows Team
Posts: 10294 Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:
Post
by Falco Girgis » Wed Nov 12, 2008 11:17 am
Code: Select all
lua_State *L;
L = luaL_newstate();
lua_close(L);
Looks like you might have been trying to call a Lua 5.0 function with Lua 5.1.
Ciidian
Chaos Rift Newbie
Posts: 14 Joined: Mon Nov 03, 2008 4:59 pm
Post
by Ciidian » Wed Nov 12, 2008 11:21 am
Thanks.. also realized I misspelled an include file name. :/