lua-users home
lua-l archive

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


Hi list,
I'm trying to build lua with the makefile (make macosx) and use the
static lib in a project.  I'm building everything on 10.5 but want to
remain compatible with 10.4.  The issue I'm having is how to make sure
the Lua makefile does the appropriate thing for this to work and I
haven't been able to find a solution.  Here are the linker errors I'm
getting when I use the 10.4u SDK path instead of the 10.5 one:

  "_strtod$UNIX2003", referenced from:
      _luaO_str2d in liblua.a(lobject.o)
  "_mktime$UNIX2003", referenced from:
      _os_time in liblua.a(loslib.o)
  "_system$UNIX2003", referenced from:
      _os_execute in liblua.a(loslib.o)
  "_strerror$UNIX2003", referenced from:
      _errfile in liblua.a(lauxlib.o)
      _pushresult in liblua.a(liolib.o)
      _pushresult in liblua.a(liolib.o)
      _fileerror in liblua.a(liolib.o)
      _io_readline in liblua.a(liolib.o)
      _os_pushresult in liblua.a(loslib.o)
  "_fputs$UNIX2003", referenced from:
      _luaB_print in liblua.a(lbaselib.o)
      _db_debug in liblua.a(ldblib.o)
  "_close$UNIX2003", referenced from:
      _os_tmpname in liblua.a(loslib.o)
  "_clock$UNIX2003", referenced from:
      _os_clock in liblua.a(loslib.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status



I modified the makefile to see if the following would work to no avail:
gcc -O2 -Wall -DLUA_USE_MACOSX -mmacosx-version-min=10.4 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk   -c -o lapi.o lapi.c

any ideas?

thanks,
wes