lua-users home
lua-l archive

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


I appeared to have fixed it, I had to link against libgcc, which you
can find here:

/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/arm-apple-darwin10/4.2.1

There's a couple different variants, depending on whether you're
building for armv6 or armv7.

On Wed, Feb 15, 2012 at 2:05 PM, Scott Shumaker <sshumaker@gmail.com> wrote:
> BTW, this is using iOS5.0.  I've reduced it to a tiny shell project,
> with a single .cpp that includes lua.h and calls lua_open.
>
> Here's the command being fed to the linker (inside XCode 4.2, but I
> initially tried building my project from the command line with a
> custom build script, and had the same linker errors):
>
>    cd /Users/sshumaker/src/jjscrybe/ninjadog-src/experimental/SimpleProject
>    setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
>    setenv PATH
> "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin"
>    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++
> -arch armv6 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
> -L/Users/sshumaker/Library/Developer/Xcode/DerivedData/SimpleProject-fzwqdctyutoiaqawhldfmygdfubs/Build/Products/Debug-iphoneos
> -L/Users/sshumaker/src/jjscrybe/ninjadog-src/experimental/SimpleProject
> -F/Users/sshumaker/Library/Developer/Xcode/DerivedData/SimpleProject-fzwqdctyutoiaqawhldfmygdfubs/Build/Products/Debug-iphoneos
> -filelist /Users/sshumaker/Library/Developer/Xcode/DerivedData/SimpleProject-fzwqdctyutoiaqawhldfmygdfubs/Build/Intermediates/SimpleProject.build/Debug-iphoneos/SimpleProject.build/Objects-normal/armv6/SimpleProject.LinkFileList
> -dead_strip -miphoneos-version-min=5.0 -framework UIKit -framework
> Foundation -framework CoreGraphics -lluajit-iphone -o
> /Users/sshumaker/Library/Developer/Xcode/DerivedData/SimpleProject-fzwqdctyutoiaqawhldfmygdfubs/Build/Products/Debug-iphoneos/SimpleProject.app/SimpleProject
>
>
>
> On Wed, Feb 15, 2012 at 2:02 PM, Scott Shumaker <sshumaker@gmail.com> wrote:
>> I'm including luajit in my iOS project (as a static library), and I
>> get the following linker errors:
>>
>> Undefined symbols for architecture armv6:
>>  "___aeabi_cdcmple", referenced from:
>>      _lj_BC_ISLT in libluajit.a(lj_vm.o)
>>      _lj_BC_ISGE in libluajit.a(lj_vm.o)
>>      _lj_BC_ISLE in libluajit.a(lj_vm.o)
>>      _lj_BC_ISGT in libluajit.a(lj_vm.o)
>>      _lj_BC_FORI in libluajit.a(lj_vm.o)
>>      _lj_BC_FORL in libluajit.a(lj_vm.o)
>>      _lj_ff_math_min in libluajit.a(lj_vm.o)
>>      ...
>>  "___aeabi_ddiv", referenced from:
>>      _lj_BC_DIVVN in libluajit.a(lj_vm.o)
>>      _lj_BC_DIVNV in libluajit.a(lj_vm.o)
>>      _lj_BC_DIVVV in libluajit.a(lj_vm.o)
>>      _lj_vm_mod in libluajit.a(lj_vm.o)
>>      _lj_vm_foldarith in libluajit.a(lj_vm.o)
>>  "___aeabi_dsub", referenced from:
>>      _lj_BC_SUBVN in libluajit.a(lj_vm.o)
>>      _lj_BC_SUBNV in libluajit.a(lj_vm.o)
>>      _lj_BC_SUBVV in libluajit.a(lj_vm.o)
>>      _lj_vm_foldarith in libluajit.a(lj_vm.o)
>>  "___aeabi_i2d", referenced from:
>>      _lj_BC_ISLT in libluajit.a(lj_vm.o)
>>      _lj_BC_ISGE in libluajit.a(lj_vm.o)
>>      _lj_BC_ISLE in libluajit.a(lj_vm.o)
>>      _lj_BC_ISGT in libluajit.a(lj_vm.o)
>>      _lj_BC_ISEQN in libluajit.a(lj_vm.o)
>>      _lj_BC_ISNEN in libluajit.a(lj_vm.o)
>>      _lj_ff_math_min in libluajit.a(lj_vm.o)
>>      ...
>>  "___aeabi_dadd", referenced from:
>>      _lj_BC_ADDVN in libluajit.a(lj_vm.o)
>>      _lj_BC_ADDNV in libluajit.a(lj_vm.o)
>>      _lj_BC_ADDVV in libluajit.a(lj_vm.o)
>>      _lj_BC_FORL in libluajit.a(lj_vm.o)
>>      _lj_vm_mod in libluajit.a(lj_vm.o)
>>      _lj_vm_foldarith in libluajit.a(lj_vm.o)
>>  "___aeabi_dmul", referenced from:
>>      _lj_BC_MULVN in libluajit.a(lj_vm.o)
>>      _lj_BC_MULNV in libluajit.a(lj_vm.o)
>>      _lj_BC_MULVV in libluajit.a(lj_vm.o)
>>      _lj_ff_math_deg in libluajit.a(lj_vm.o)
>>      _lj_vm_mod in libluajit.a(lj_vm.o)
>>      _lj_vm_foldarith in libluajit.a(lj_vm.o)
>>  "___aeabi_cdcmpeq", referenced from:
>>      _lj_BC_ISEQN in libluajit.a(lj_vm.o)
>>      _lj_BC_ISNEN in libluajit.a(lj_vm.o)
>> ld: symbol(s) not found for architecture armv6
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)