Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld: framework not found (homemade framework)

I'm trying to deploy a project on an Ipad, containing a homemade framework called "HelloUnity.framework".

When I try to deploy my project I get the following error :

ld: framework not found HelloUnity clang: error: linker command failed
with exit code 1 (use -v to see invocation)

More specific :

Ld /Users/LabInnovation/Library/Developer/Xcode/DerivedData/Unity-iPhone-akzhbmwtkcooizfaebdhmbyuhrbk/Build/Products/test.app/test normal armv7
    cd /Users/LabInnovation/IpadWii/IpadWii
    setenv IPHONEOS_DEPLOYMENT_TARGET 2.2.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/LabInnovation/Library/Developer/Xcode/DerivedData/Unity-iPhone-akzhbmwtkcooizfaebdhmbyuhrbk/Build/Products -L/Users/LabInnovation/IpadWii/IpadWii -L/Users/LabInnovation/IpadWii/IpadWii/Libraries -F/Users/LabInnovation/Library/Developer/Xcode/DerivedData/Unity-iPhone-akzhbmwtkcooizfaebdhmbyuhrbk/Build/Products -F/Users/LabInnovation/IpadWii/IpadWii/../../Desktop -F/Users/LabInnovation/IpadWii/IpadWii -filelist /Users/LabInnovation/Library/Developer/Xcode/DerivedData/Unity-iPhone-akzhbmwtkcooizfaebdhmbyuhrbk/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/test.LinkFileList -dead_strip -all_load -weak_framework CoreMotion -weak-lSystem -fobjc-link-runtime -miphoneos-version-min=2.2.1 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -framework AudioToolbox -framework CFNetwork -framework MediaPlayer -framework CoreLocation -framework SystemConfiguration -weak_framework iAd -framework CoreMedia -framework CoreVideo -framework HelloUnity -weak_framework AVFoundation -framework CoreGraphics -weak_framework CoreMotion -weak_framework GameKit -o /Users/LabInnovation/Library/Developer/Xcode/DerivedData/Unity-iPhone-akzhbmwtkcooizfaebdhmbyuhrbk/Build/Products/test.app/test

And I don't know why, because my framework exist and the framework's folder is not empty. What is wrong?

Thanks,

like image 998
Benjamin Gimet Avatar asked Oct 31 '12 09:10

Benjamin Gimet


1 Answers

Since iOS does not support shared libraries, you need to make sure your framework is compiling to a static library.

I'm not sure about this part, but you may have to link against the static library and not the framework (i.e, '-framework HelloUnity' may not be good even if your framework is static.)

like image 154
Tim Avatar answered Oct 20 '22 17:10

Tim