2

我正在尝试在 OS X Lion 上针对 iOS SDK 5.0 构建 MobileVLC。到目前为止,没有骰子。

但是,按照给定的说明,构建在此处停止并失败:[info] Building contrib for iOS in '/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-builddir-ios-i686-apple-darwin10

当前日志:./buildMobileVLC.sh -s [info] Preparing build dirs [info] Building [info] Building vlc [info] Building libvlc for the iOS [info] Using i386 with SDK version 4.2 [info] Building contrib for iOS in '/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-builddir-ios-i686-apple-darwin10'

错误如下:

make[1]: *** [.ffmpeg] Error 1
make: *** [using-src] Error 2

/ImportedSources/vlc/contrib-builddir-ios-arm-apple-darwin10/build-src/ffmpeg/config.log 告诉我:

ld: warning: directory not found for option 'L/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-ios-arm-apple-darwin10/lib'
ld: warning: directory not found for option '-L/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-ios-arm-apple-darwin10/lib'
**ld: in /usr/lib/system/libcache.dylib, missing required architecture armv7 in file for architecture armv7**
collect2: ld returned 1 exit status
C compiler test failed.

我加粗了我认为导致它失败的那个。现在 - 我该如何解决这个错误?

4

2 回答 2

1

This got it to work for me:

./configure --extra-ldflags=-L/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system --enable-cross-compile --arch=arm --target-os=darwin --cc='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc -arch armv7' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --cpu=cortex-a8 --enable-pic --extra-ldflags='-arch armv7'

于 2012-09-28T16:32:58.457 回答
1

将“-L$(SDKROOT)/usr/lib/system”添加到 LDFLAGS 变量。

其中 SDKROOT 是指向最新 iOS 的目录。

例如:/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk

于 2011-12-10T17:30:10.230 回答