You are not logged in.

#1 2012-05-10 03:52:09

seoushi
Member
Registered: 2012-05-10
Posts: 1

issue linking with lua [solved]

I can't figure out what I'm doing wrong. I have lua 5.1 installed and am linking against it but for whatever reason it can't find the symbols for lua.

[seoushi@computer test]$ make
g++ -c engine.cpp -O2 -pipe -Wall -static -ansi  -o engine.o
g++ -c scripting.cpp -O2 -pipe -Wall -static -ansi  -o scripting.o
scripting.cpp: In function 'bool LAV_scripting_load(lua_State*, const char*, bool)':
scripting.cpp:92:5: warning: 'success' may be used uninitialized in this function [-Wuninitialized]
g++ -c texture.cpp -O2 -pipe -Wall -static -ansi  -o texture.o
g++ -c main.cpp -O2 -pipe -Wall -static -ansi  -o main.o
g++ -c display.cpp -O2 -pipe -Wall -static -ansi  -o display.o
g++ -c input.cpp -O2 -pipe -Wall -static -ansi  -o input.o
g++ -c util.cpp -O2 -pipe -Wall -static -ansi  -o util.o
g++ -o test engine.o scripting.o texture.o main.o display.o input.o util.o -lstdc++ -llua -lGLEW -lglfw -lSOIL -lGL -lX11 -lm  
scripting.o: In function `LAV_scripting_init()':
scripting.cpp:(.text+0x2): undefined reference to `luaL_newstate()'
scripting.cpp:(.text+0xd): undefined reference to `luaopen_io(lua_State*)'
scripting.cpp:(.text+0x15): undefined reference to `luaopen_base(lua_State*)'
scripting.cpp:(.text+0x1d): undefined reference to `luaopen_table(lua_State*)'
scripting.cpp:(.text+0x25): undefined reference to `luaopen_string(lua_State*)'
scripting.cpp:(.text+0x2d): undefined reference to `luaopen_math(lua_State*)'
scripting.o: In function `LAV_scripting_registerFunc(lua_State*, int (*)(lua_State*), char const*)':
scripting.cpp:(.text+0x67): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
scripting.o: In function `LAV_sq_scripting_import(lua_State*)':
scripting.cpp:(.text+0x45c): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
scripting.o: In function `LAV_scripting_shutdown(lua_State*)':
scripting.cpp:(.text+0x41): undefined reference to `lua_close(lua_State*)'
scripting.o: In function `LAV_scripting_registerFunc(lua_State*, int (*)(lua_State*), char const*)':
scripting.cpp:(.text+0x85): undefined reference to `lua_setfield(lua_State*, int, char const*)'
main.o: In function `main':
main.cpp:(.text.startup+0x27): undefined reference to `LAV_lua_scripting_register(lua_State*)'
main.cpp:(.text.startup+0x3f): undefined reference to `LAV_lua_util_register(lua_State*)'
input.o: In function `LAV_lua_input_getEvents(lua_State*)':
input.cpp:(.text+0x1d): undefined reference to `lua_pushnil(lua_State*)'
texture.o: In function `LAV_lua_texture_load(lua_State*)':
texture.cpp:(.text+0xd0): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
texture.cpp:(.text+0xee): undefined reference to `lua_pushnil(lua_State*)'
texture.o: In function `LAV_lua_texture_unload(lua_State*)':
texture.cpp:(.text+0x12a): undefined reference to `lua_tointeger(lua_State*, int)'
texture.o: In function `LAV_lua_texture_bind(lua_State*)':
texture.cpp:(.text+0x15a): undefined reference to `lua_tointeger(lua_State*, int)'
texture.o: In function `LAV_lua_texture_draw(lua_State*)':
texture.cpp:(.text+0x29e): undefined reference to `lua_tonumber(lua_State*, int)'
texture.cpp:(.text+0x2b1): undefined reference to `lua_tonumber(lua_State*, int)'
texture.cpp:(.text+0x2c4): undefined reference to `lua_tonumber(lua_State*, int)'
texture.cpp:(.text+0x2d7): undefined reference to `lua_tonumber(lua_State*, int)'
texture.cpp:(.text+0x2ea): undefined reference to `lua_tonumber(lua_State*, int)'
texture.o:texture.cpp:(.text+0x2fd): more undefined references to `lua_tonumber(lua_State*, int)' follow
display.o: In function `LAV_lua_display_wasCloseRequested(lua_State*)':
display.cpp:(.text+0x23): undefined reference to `lua_pushboolean(lua_State*, int)'
display.o: In function `LAV_lua_display_show(lua_State*)':
display.cpp:(.text+0x17b): undefined reference to `lua_tointeger(lua_State*, int)'
display.cpp:(.text+0x18b): undefined reference to `lua_tointeger(lua_State*, int)'
display.cpp:(.text+0x19d): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
display.cpp:(.text+0x1ad): undefined reference to `lua_toboolean(lua_State*, int)'
display.cpp:(.text+0x1bd): undefined reference to `lua_toboolean(lua_State*, int)'
display.cpp:(.text+0x1cd): undefined reference to `lua_tointeger(lua_State*, int)'
display.cpp:(.text+0x1fa): undefined reference to `lua_pushboolean(lua_State*, int)'
util.o: In function `LAV_sq_util_getTime(lua_State*)':
util.cpp:(.text+0xd): undefined reference to `lua_pushnumber(lua_State*, double)'
collect2: error: ld returned 1 exit status
make: *** [test] Error 1

from looking at the library itself it does seem to expose all the symbols.

[seoushi@computer test]$ readelf -s /usr/lib/liblua.so                 

Symbol table '.dynsym' contains 232 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000006270     0 SECTION LOCAL  DEFAULT    9 
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_toupper_loc@GLIBC_2.3 (2)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getenv@GLIBC_2.2.5 (3)
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.2.5 (3)
     5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND localtime@GLIBC_2.2.5 (3)
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.2.5 (3)
     7: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ldexp@GLIBC_2.2.5 (4)
     8: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strncpy@GLIBC_2.2.5 (3)
     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND remove@GLIBC_2.2.5 (3)
    10: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
    11: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stdout@GLIBC_2.2.5 (3)
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcpy@GLIBC_2.2.5 (3)
    13: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __isoc99_fscanf@GLIBC_2.7 (5)
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ferror@GLIBC_2.2.5 (3)
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fread@GLIBC_2.2.5 (3)
    16: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stdin@GLIBC_2.2.5 (3)
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtod@GLIBC_2.2.5 (3)
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp@GLIBC_2.2.5 (4)
    19: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND localeconv@GLIBC_2.2.5 (3)
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND atan@GLIBC_2.2.5 (4)
    21: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND clock@GLIBC_2.2.5 (3)
    22: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fclose@GLIBC_2.2.5 (3)
    23: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.2.5 (3)
    24: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (6)
    25: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND system@GLIBC_2.2.5 (3)
    26: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 (3)
    27: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND difftime@GLIBC_2.2.5 (3)
    28: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pclose@GLIBC_2.2.5 (3)
    29: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND modf@GLIBC_2.2.5 (4)
    30: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strrchr@GLIBC_2.2.5 (3)
    31: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fputs@GLIBC_2.2.5 (3)
    32: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND freopen@GLIBC_2.2.5 (3)
    33: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pow@GLIBC_2.2.5 (4)
    34: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND log@GLIBC_2.2.5 (4)
    35: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strncat@GLIBC_2.2.5 (3)
    36: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.2.5 (3)
    37: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fmod@GLIBC_2.2.5 (4)
    38: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND cos@GLIBC_2.2.5 (4)
    39: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fputc@GLIBC_2.2.5 (3)
    40: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memchr@GLIBC_2.2.5 (3)
    41: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND acos@GLIBC_2.2.5 (4)
    42: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND srand@GLIBC_2.2.5 (3)
    43: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcmp@GLIBC_2.2.5 (3)
    44: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fgets@GLIBC_2.2.5 (3)
    45: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND frexp@GLIBC_2.2.5 (4)
    46: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _setjmp@GLIBC_2.2.5 (3)
    47: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tmpfile@GLIBC_2.2.5 (3)
    48: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcmp@GLIBC_2.2.5 (3)
    49: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND log10@GLIBC_2.2.5 (4)
    50: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ftell@GLIBC_2.2.5 (3)
    51: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND feof@GLIBC_2.2.5 (3)
    52: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    53: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND clearerr@GLIBC_2.2.5 (3)
    54: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (7)
    55: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND cosh@GLIBC_2.2.5 (4)
    56: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND time@GLIBC_2.2.5 (3)
    57: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlopen@GLIBC_2.2.5 (8)
    58: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sinh@GLIBC_2.2.5 (4)
    59: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fflush@GLIBC_2.2.5 (3)
    60: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _IO_getc@GLIBC_2.2.5 (3)
    61: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tan@GLIBC_2.2.5 (4)
    62: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ungetc@GLIBC_2.2.5 (3)
    63: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcoll@GLIBC_2.2.5 (3)
    64: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mktime@GLIBC_2.2.5 (3)
    65: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND atan2@GLIBC_2.2.5 (4)
    66: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mkstemp@GLIBC_2.2.5 (3)
    67: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strpbrk@GLIBC_2.2.5 (3)
    68: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fseek@GLIBC_2.2.5 (3)
    69: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.2.5 (8)
    70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __strncpy_chk@GLIBC_2.3.4 (9)
    71: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND realloc@GLIBC_2.2.5 (3)
    72: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND setlocale@GLIBC_2.2.5 (3)
    73: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND setvbuf@GLIBC_2.2.5 (3)
    74: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __longjmp_chk@GLIBC_2.11 (10)
    75: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strftime@GLIBC_2.2.5 (3)
    76: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND popen@GLIBC_2.2.5 (3)
    77: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fopen@GLIBC_2.2.5 (3)
    78: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    79: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND rename@GLIBC_2.2.5 (3)
    80: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND gmtime@GLIBC_2.2.5 (3)
    81: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sin@GLIBC_2.2.5 (4)
    82: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtoul@GLIBC_2.2.5 (3)
    83: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND floor@GLIBC_2.2.5 (4)
    84: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcat@GLIBC_2.2.5 (3)
    85: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tanh@GLIBC_2.2.5 (4)
    86: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND asin@GLIBC_2.2.5 (4)
    87: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exit@GLIBC_2.2.5 (3)
    88: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fwrite@GLIBC_2.2.5 (3)
    89: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __fprintf_chk@GLIBC_2.3.4 (9)
    90: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
    91: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sqrt@GLIBC_2.2.5 (4)
    92: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strerror@GLIBC_2.2.5 (3)
    93: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.2.5 (8)
    94: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ceil@GLIBC_2.2.5 (4)
    95: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.2.5 (3)
    96: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strstr@GLIBC_2.2.5 (3)
    97: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND rand@GLIBC_2.2.5 (3)
    98: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlerror@GLIBC_2.2.5 (8)
    99: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_tolower_loc@GLIBC_2.3 (2)
   100: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_b_loc@GLIBC_2.3 (2)
   101: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@GLIBC_2.2.5 (3)
   102: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __sprintf_chk@GLIBC_2.3.4 (9)
   103: 0000000000007800    52 FUNC    GLOBAL DEFAULT   11 lua_tointeger
   104: 0000000000018940    30 FUNC    GLOBAL DEFAULT   11 luaL_pushresult
   105: 0000000000007f00    73 FUNC    GLOBAL DEFAULT   11 lua_rawgeti
   106: 00000000000075a0    28 FUNC    GLOBAL DEFAULT   11 lua_typename
   107: 00000000000079e0    31 FUNC    GLOBAL DEFAULT   11 lua_tocfunction
   108: 0000000000008140   130 FUNC    GLOBAL DEFAULT   11 lua_rawset
   109: 00000000000134f0   547 FUNC    GLOBAL DEFAULT   11 lua_newstate
   110: 00000000000077d0    44 FUNC    GLOBAL DEFAULT   11 lua_tonumber
   111: 0000000000018c10   147 FUNC    GLOBAL DEFAULT   11 luaL_unref
   112: 0000000000007f50    93 FUNC    GLOBAL DEFAULT   11 lua_createtable
   113: 00000000000085a0   306 FUNC    GLOBAL DEFAULT   11 lua_gc
   114: 0000000000007dd0    26 FUNC    GLOBAL DEFAULT   11 lua_pushboolean
   115: 000000000000af70   116 FUNC    GLOBAL DEFAULT   11 lua_getlocal
   116: 0000000000008300   195 FUNC    GLOBAL DEFAULT   11 lua_setfenv
   117: 0000000000018cb0   713 FUNC    GLOBAL DEFAULT   11 luaL_loadfile
   118: 000000000000c800   196 FUNC    GLOBAL DEFAULT   11 lua_resume
   119: 0000000000013720   109 FUNC    GLOBAL DEFAULT   11 lua_close
   120: 0000000000007920   185 FUNC    GLOBAL DEFAULT   11 lua_objlen
   121: 0000000000018a40   208 FUNC    GLOBAL DEFAULT   11 luaL_gsub
   122: 0000000000018580   293 FUNC    GLOBAL DEFAULT   11 luaL_findtable
   123: 0000000000008440   155 FUNC    GLOBAL DEFAULT   11 lua_pcall
   124: 0000000000007300     9 FUNC    GLOBAL DEFAULT   11 lua_setlevel
   125: 0000000000018890    99 FUNC    GLOBAL DEFAULT   11 luaL_addlstring
   126: 0000000000017f80   162 FUNC    GLOBAL DEFAULT   11 luaL_checkudata
   127: 00000000000088d0   156 FUNC    GLOBAL DEFAULT   11 lua_setupvalue
   128: 0000000000007c40   186 FUNC    GLOBAL DEFAULT   11 lua_pushfstring
   129: 0000000000008810   111 FUNC    GLOBAL DEFAULT   11 lua_newuserdata
   130: 0000000000018190   148 FUNC    GLOBAL DEFAULT   11 luaL_optlstring
   131: 00000000000086f0    55 FUNC    GLOBAL DEFAULT   11 lua_next
   132: 0000000000008010   121 FUNC    GLOBAL DEFAULT   11 lua_getfenv
   133: 0000000000008560    47 FUNC    GLOBAL DEFAULT   11 lua_dump
   134: 0000000000017e70    96 FUNC    GLOBAL DEFAULT   11 luaL_typerror
   135: 0000000000008800    13 FUNC    GLOBAL DEFAULT   11 lua_setallocf
   136: 0000000000018030    80 FUNC    GLOBAL DEFAULT   11 luaL_checkstack
   137: 0000000000007e10    37 FUNC    GLOBAL DEFAULT   11 lua_pushthread
   138: 00000000000183b0    97 FUNC    GLOBAL DEFAULT   11 luaL_checkinteger
   139: 0000000000007420    76 FUNC    GLOBAL DEFAULT   11 lua_insert
   140: 0000000000018ff0    43 FUNC    GLOBAL DEFAULT   11 luaL_newstate
   141: 000000000001e730    33 FUNC    GLOBAL DEFAULT   11 luaopen_table
   142: 000000000022bd98     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
   143: 000000000000aff0   113 FUNC    GLOBAL DEFAULT   11 lua_setlocal
   144: 0000000000007ed0    44 FUNC    GLOBAL DEFAULT   11 lua_rawget
   145: 0000000000018fb0    59 FUNC    GLOBAL DEFAULT   11 luaL_loadstring
   146: 0000000000007e60   110 FUNC    GLOBAL DEFAULT   11 lua_getfield
   147: 0000000000021a20   141 OBJECT  GLOBAL DEFAULT   13 lua_ident
   148: 0000000000007330    52 FUNC    GLOBAL DEFAULT   11 lua_newthread
   149: 00000000000180e0    79 FUNC    GLOBAL DEFAULT   11 luaL_checkany
   150: 0000000000007fb0    88 FUNC    GLOBAL DEFAULT   11 lua_getmetatable
   151: 00000000000072a0    91 FUNC    GLOBAL DEFAULT   11 lua_xmove
   152: 0000000000007470   224 FUNC    GLOBAL DEFAULT   11 lua_replace
   153: 0000000000021978     0 FUNC    GLOBAL DEFAULT   12 _fini
   154: 00000000000075e0    45 FUNC    GLOBAL DEFAULT   11 lua_isnumber
   155: 0000000000006270     0 FUNC    GLOBAL DEFAULT    9 _init
   156: 00000000000086e0    16 FUNC    GLOBAL DEFAULT   11 lua_error
   157: 0000000000007b30    97 FUNC    GLOBAL DEFAULT   11 lua_pushlstring
   158: 000000000001b7b0    33 FUNC    GLOBAL DEFAULT   11 luaopen_debug
   159: 0000000000007b10    26 FUNC    GLOBAL DEFAULT   11 lua_pushinteger
   160: 0000000000018b10   245 FUNC    GLOBAL DEFAULT   11 luaL_ref
   161: 000000000022bd98     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
   162: 0000000000008590     5 FUNC    GLOBAL DEFAULT   11 lua_status
   163: 00000000000084e0    44 FUNC    GLOBAL DEFAULT   11 lua_cpcall
   164: 000000000000ae90    39 FUNC    GLOBAL DEFAULT   11 lua_sethook
   165: 0000000000008510    77 FUNC    GLOBAL DEFAULT   11 lua_load
   166: 00000000000186b0   395 FUNC    GLOBAL DEFAULT   11 luaL_openlib
   167: 000000000022bda0     0 NOTYPE  GLOBAL DEFAULT  ABS _end
   168: 000000000001d3a0   142 FUNC    GLOBAL DEFAULT   11 luaopen_math
   169: 0000000000017f10   112 FUNC    GLOBAL DEFAULT   11 luaL_newmetatable
   170: 0000000000017bf0   133 FUNC    GLOBAL DEFAULT   11 luaL_where
   171: 0000000000007840    41 FUNC    GLOBAL DEFAULT   11 lua_toboolean
   172: 00000000000080c0   114 FUNC    GLOBAL DEFAULT   11 lua_setfield
   173: 0000000000007af0    21 FUNC    GLOBAL DEFAULT   11 lua_pushnumber
   174: 0000000000018130    88 FUNC    GLOBAL DEFAULT   11 luaL_checklstring
   175: 0000000000007310    19 FUNC    GLOBAL DEFAULT   11 lua_atpanic
   176: 000000000000aef0   123 FUNC    GLOBAL DEFAULT   11 lua_getstack
   177: 0000000000018350    85 FUNC    GLOBAL DEFAULT   11 luaL_optnumber
   178: 0000000000007550    35 FUNC    GLOBAL DEFAULT   11 lua_pushvalue
   179: 0000000000007e40    32 FUNC    GLOBAL DEFAULT   11 lua_gettable
   180: 0000000000017d50   283 FUNC    GLOBAL DEFAULT   11 luaL_argerror
   181: 0000000000008730   165 FUNC    GLOBAL DEFAULT   11 lua_concat
   182: 000000000001ca60   299 FUNC    GLOBAL DEFAULT   11 luaopen_io
   183: 0000000000018f80    33 FUNC    GLOBAL DEFAULT   11 luaL_loadbuffer
   184: 0000000000017c80   193 FUNC    GLOBAL DEFAULT   11 luaL_error
   185: 0000000000007c00    58 FUNC    GLOBAL DEFAULT   11 lua_pushvfstring
   186: 0000000000018840     7 FUNC    GLOBAL DEFAULT   11 luaL_register
   187: 0000000000007630    26 FUNC    GLOBAL DEFAULT   11 lua_isuserdata
   188: 000000000000aec0     5 FUNC    GLOBAL DEFAULT   11 lua_gethook
   189: 0000000000007610    26 FUNC    GLOBAL DEFAULT   11 lua_isstring
   190: 0000000000007a30    20 FUNC    GLOBAL DEFAULT   11 lua_tothread
   191: 0000000000007d00   204 FUNC    GLOBAL DEFAULT   11 lua_pushcclosure
   192: 000000000001dc90    33 FUNC    GLOBAL DEFAULT   11 luaopen_os
   193: 0000000000021920    88 FUNC    GLOBAL DEFAULT   11 luaL_openlibs
   194: 000000000000c8d0    85 FUNC    GLOBAL DEFAULT   11 lua_yield
   195: 0000000000007650   117 FUNC    GLOBAL DEFAULT   11 lua_rawequal
   196: 00000000000182d0   117 FUNC    GLOBAL DEFAULT   11 luaL_checknumber
   197: 0000000000018960   181 FUNC    GLOBAL DEFAULT   11 luaL_addvalue
   198: 0000000000007380    72 FUNC    GLOBAL DEFAULT   11 lua_settop
   199: 0000000000007a50   120 FUNC    GLOBAL DEFAULT   11 lua_topointer
   200: 0000000000007750   117 FUNC    GLOBAL DEFAULT   11 lua_lessthan
   201: 0000000000021770   422 FUNC    GLOBAL DEFAULT   11 luaopen_package
   202: 0000000000007580    27 FUNC    GLOBAL DEFAULT   11 lua_type
   203: 00000000000076d0   124 FUNC    GLOBAL DEFAULT   11 lua_equal
   204: 0000000000008270   141 FUNC    GLOBAL DEFAULT   11 lua_setmetatable
   205: 00000000000087e0    25 FUNC    GLOBAL DEFAULT   11 lua_getallocf
   206: 0000000000018230   148 FUNC    GLOBAL DEFAULT   11 luaL_checkoption
   207: 00000000000083d0    97 FUNC    GLOBAL DEFAULT   11 lua_call
   208: 00000000000081d0   146 FUNC    GLOBAL DEFAULT   11 lua_rawseti
   209: 0000000000018480   143 FUNC    GLOBAL DEFAULT   11 luaL_getmetafield
   210: 0000000000018080    91 FUNC    GLOBAL DEFAULT   11 luaL_checktype
   211: 0000000000007ba0    83 FUNC    GLOBAL DEFAULT   11 lua_pushstring
   212: 0000000000018510   109 FUNC    GLOBAL DEFAULT   11 luaL_callmeta
   213: 000000000001a610   360 FUNC    GLOBAL DEFAULT   11 luaopen_base
   214: 0000000000007210   139 FUNC    GLOBAL DEFAULT   11 lua_checkstack
   215: 0000000000007370    13 FUNC    GLOBAL DEFAULT   11 lua_gettop
   216: 00000000000073d0    74 FUNC    GLOBAL DEFAULT   11 lua_remove
   217: 0000000000008090    39 FUNC    GLOBAL DEFAULT   11 lua_settable
   218: 0000000000007ad0    20 FUNC    GLOBAL DEFAULT   11 lua_pushnil
   219: 0000000000018850    49 FUNC    GLOBAL DEFAULT   11 luaL_prepbuffer
   220: 0000000000018420    86 FUNC    GLOBAL DEFAULT   11 luaL_optinteger
   221: 0000000000007df0    20 FUNC    GLOBAL DEFAULT   11 lua_pushlightuserdata
   222: 0000000000020980   187 FUNC    GLOBAL DEFAULT   11 luaopen_string
   223: 0000000000007a00    40 FUNC    GLOBAL DEFAULT   11 lua_touserdata
   224: 0000000000018a20    19 FUNC    GLOBAL DEFAULT   11 luaL_buffinit
   225: 000000000000b070  1157 FUNC    GLOBAL DEFAULT   11 lua_getinfo
   226: 000000000000aed0     5 FUNC    GLOBAL DEFAULT   11 lua_gethookmask
   227: 0000000000008880    75 FUNC    GLOBAL DEFAULT   11 lua_getupvalue
   228: 00000000000075c0    31 FUNC    GLOBAL DEFAULT   11 lua_iscfunction
   229: 0000000000018900    56 FUNC    GLOBAL DEFAULT   11 luaL_addstring
   230: 0000000000007870   164 FUNC    GLOBAL DEFAULT   11 lua_tolstring
   231: 000000000000aee0     4 FUNC    GLOBAL DEFAULT   11 lua_gethookcount

Is there something I'm overlooking here?

Edit:
I forgot to put extern "C" { } arround the lua headers.

Last edited by seoushi (2012-05-10 05:54:13)

Offline

Board footer

Powered by FluxBB