缺少MediaLibsDemo的体系结构x86_64

时间:2014-01-06 10:27:34

标签: architecture ios7 xcode5 x86-64

我使用以下库连接到Red5服务器。 https://github.com/slavavdovichenko/MediaLibDemos。 它给了我以下错误。如何将缺少的体系结构添加到以下文件中?或其他一些解决方案?

on implementing it, I am getting the following error.
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libavutil.a, missing required architecture x86_64 in file   
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavutil.a (2 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libavdevice.a, missing required architecture x86_64 in file
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavdevice.a (2 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libswscale.a, missing required architecture x86_64 in file  
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libswscale.a (2 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libavformat.a, missing required architecture x86_64 in file 
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavformat.a (2 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libavcodec.a, missing required architecture x86_64 in file 
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavcodec.a (2 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav-
v9.1965/lib/libavfilter.a, missing required architecture x86_64 in file 
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavfilter.a (2 slices)
ld: warning: ignoring file /var/root/Documents/RTMP/RTMP/lib/MediaLibiOS/MediaLibiOS.a, 
missing required architecture x86_64 in file
/var/root/Documents/RTMP/RTMP/lib/MediaLibiOS/MediaLibiOS.a (3 slices)
ld: warning: ignoring file /private/var/root/Documents/RTMP/RTMP/lib/libav- 
v9.1965/lib/libavresample.a, missing required architecture x86_64 in file  
/private/var/root/Documents/RTMP/RTMP/lib/libav-v9.1965/lib/libavresample.a (2 slices)
ld: warning: ignoring file /var/root/Documents/RTMP/RTMP/lib/CommLibiOS/CommLibiOS.a, 
missing required architecture x86_64 in    
file/var/root/Documents/RTMP/RTMP/lib/CommLibiOS/CommLibiOS.a (4 slices)

Undefined symbols for architecture x86_64:
 "_OBJC_CLASS_$_BroadcastStreamClient", referenced from:
    objc-class-ref in ViewController.o
 "_OBJC_CLASS_$_RTMPClient", referenced from:
    objc-class-ref in ViewController.o
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:1)

看起来您使用的库不是为64位架构而构建的。如果情况确实如此,那么您需要将Xcode配置为仅构建32位(假设您无法获得64位版本):

  1. 在目标构建设置中指定有效体系结构以排除64位(arm64)
  2. Build Active Architecture Only设置为NO(调试时)
  3. enter image description here

    默认情况下,在调试时,Xcode只会构建活动架构。因此,这意味着如果您在64位设备或模拟器上进行测试,Xcode将尝试构建64位二进制文​​件,这将与您的32位库不兼容。