Lua causing compiler errors

Apprentice
Posts: 17
Joined: 2007.02
Post: #1
I've been trying to embed Lua into my game. I heard it was easy to embed and program so I decided to use it over the other scripting languages. I downloaded a pre-built framework, put it into my app, included the nessesary headers, declared my lua state, and used lua_open() to get everything started. Then I decided to compile to make sure that everything is working, I get:

warning in /Users/Home/Library/Frameworks/Lua.framework/Lua, file is not of required architecture

Error: "lua_open()", referenced from:
LuaScript::LuaScript() in script.o
symbol(s) not found
collect2: Id returned 1 exit status

Here is my code:

script.h
Code:
#include <Lua/Lua.h>
#include <Lua/lualib.h>
#include <Lua/lauxlib.h>

class luaScript
{
    private:
    
    // the lua state
    lua_State* whLuaState;
    
    public:
    
    luaScript();
};

script.cpp
Code:
#include "script.h"

luaScript::luaScript()
{
    whLuaState = lua_open();
}

I searched google and no one else seems to have the same problem.

I got the framework from: http://blog.trickyfly.com/?p=20
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Python Compiler wyrmmage 3 4,099 Jul 30, 2009 10:14 PM
Last Post: wyrmmage