(我将这个问题发布到 VideoLAN 论坛,但还没有接受者。我知道 SO 社区不会让我失望。)
我正在尝试为 iOS 构建 MobileVLC 项目。我已经完成了构建项目的命令行过程,并且经过了一些调整,如http://forum.videolan.org/viewtopic.php?f=12&t=103331和http://forum.videolan 中所述。 org/viewtopic.php?f=12&t=103271,构建脚本运行几乎完成。当它试图让 Xcode 构建最终项目时,它会出错。所以我将它加载到 Xcode 中并尝试构建,我可以看到错误,这是我使用 -v 链接器标志时得到的:
Ld /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos/VLC.app/VLC normal armv7
cd /Users/bp/Desktop/vlc/MobileVLC
setenv IPHONEOS_DEPLOYMENT_TARGET 5.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/iPhoneOS5.1.sdk -L/Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos -L/Users/bp/Desktop/vlc/MobileVLC/External/MobileVLCKit -L/Users/bp/Desktop/vlc/MobileVLC/External/MediaLibraryKit -F/Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos -filelist /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Intermediates/MobileVLC.build/Debug-iphoneos/MobileVLC.build/Objects-normal/armv7/VLC.LinkFileList -dead_strip -Wl,-no_pie,-v -fobjc-link-runtime -miphoneos-version-min=5.1 -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework AudioToolbox -framework QuartzCore -liconv -lz /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos/libMobileMediaLibraryKit.a -lsqlite3 -lstdc++.6 -lbz2 -lxml2 -framework CoreData -framework CoreText -framework MediaPlayer /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos/libMobileVLCKit.a -o /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos/VLC.app/VLC
@(#)PROGRAM:ld PROJECT:ld64-133.3
configured to support archs: armv6 armv7 i386 x86_64
Library search paths:
/Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos
/Users/bp/Desktop/vlc/MobileVLC/External/MobileVLCKit
/Users/bp/Desktop/vlc/MobileVLC/External/MediaLibraryKit
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib
Framework search paths:
/Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/
LLVM version 3.1svn, from Apple Clang 4.0 (build 421.0.60)
ld: 'non_lazy_ptr' in /Users/bp/Library/Developer/Xcode/DerivedData/MobileVLC-ctcjnpeqzuhulxcmjlhrjnyzpzil/Build/Products/Debug-iphoneos/libMobileVLCKit.a(libdeinterlace_plugin_la-deinterlace.o) contains undefined reference for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
据我所知,libMobileVLCKit.a 文件已链接到 MobileVLC 项目,因此我不确定接下来要查找什么,因为我在任何代码的任何地方都找不到对 non_lazy_ptr 的任何引用,并且框架引用看起来都不错。即使您不知道解决方案,任何关于在哪里寻找问题的想法都将不胜感激。谢谢。
编辑:这是一个屏幕截图,显示了 MobileVLC 项目的 Build Phases 选项卡中的所有内容。
编辑 2:我在 VideoLAN 论坛上的帖子得到了一些“我也是”的回复,以及一个与另一个用户的错误非常相似的错误。这是错误消息的最后一行:
ld: '_AmplifyFloat' in /Users/**/MobileVLC/ImportedSources/VLCKit/build/Release-iphoneos/libMobileVLCKit.a(libvolume_neon_plugin_la-volume.o) contains undefined reference for architecture armv7
这是 VideoLAN 论坛上的帖子:http: //forum.videolan.org/viewtopic.php? f=12&t=103433
编辑 3:我从 VideoLAN 的 git 存储库中获取了源代码的新副本,并查看了 user1071136 在下面提供的答案,最终得到了与他们得到的完全相同的错误。
我在 Stack Overflow 上发现了一个类似的错误,表明解决方案是检查以确保构建设置中的Generate Position-Dependent Code
选项Apple LLVC compiler 4.0 - Code Generation
设置为否。但是像往常一样尝试在 iOS 上运行 VLC,这也是一个死胡同为此,构建设置已设置为否。