lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I am trying to statically link lua in my cpp program, but still I am getting errors like

undefined reference to `lua_pushnumber(lua_State*, double)'


Here is what I am doing:

Create a library using:    
    ar -x $(OAE_ROOT)/embed/linux/liblua.a
    ar -x $(OAE_ROOT)/embed/linux/libSDL.a
    ar -x $(OAE_ROOT)/embed/linux/libSDL_image.a   
    ar -x $(OAE_ROOT)/embed/linux/libftgl.a
    ar -x $(OAE_ROOT)/embed/linux/libxpath.a
    ar -cq liboaengine.a *.o

and then when i compile my code i use

g++ -g -Wall  -o catalyst main.o globalvars.o catalyst.o -lGL -lGLU -lfreetype -lpng -L. -loaengine


Any clue to what is going wrong ?

-Abhinav