AnyChat技术支持论坛

标题: xcode5引用sdk出现错误 [打印本页]

作者: fus53    时间: 2013-10-26 18:30
标题: xcode5引用sdk出现错误
使用最新版本xcode时,引用sdk后编译不通过。对照sdk包中的demo,已经将.a文件引用到项目中,且对照demo配置信息进行了设置。但运行时出现以下错误:
Ld /Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Products/Debug-iphonesimulator/AnyChat.app/AnyChat normal i386
    cd /Users/xx/Documents/AnyChat
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Products/Debug-iphonesimulator -L/Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs -L/Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess -F/Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Products/Debug-iphonesimulator -filelist /Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Intermediates/AnyChat.build/Debug-iphonesimulator/AnyChat.build/Objects-normal/i386/AnyChat.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -framework CoreAudio -lbz2 -lz -framework CoreVideo -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework CoreGraphics -laudio_processing -lopencore-amrwb -lswscale -framework UIKit -lspeexdsp -lavformat -lavcodec -framework Foundation -ltheora -lvad -lavdevice -lvo-amrwbenc -lsystem_wrappers -lavutil -lvpx -lcelt0 -lanychatcore -lspeex -lx264 -lmediacore -lmediautil -lopencore-amrnb -lsignal_processing -lpostproc -lmediashow -logg -Xlinker -dependency_info -Xlinker /Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Intermediates/AnyChat.build/Debug-iphonesimulator/AnyChat.build/Objects-normal/i386/AnyChat_dependency_info.dat -o /Users/xx/Library/Developer/Xcode/DerivedData/AnyChat-chfytuerboxtvhgvxrylzuzmulxt/Build/Products/Debug-iphonesimulator/AnyChat.app/AnyChat

ld: warning: ignoring file /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libaudio_processing.a, file was built for archive which is not the architecture being linked (i386): /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libaudio_processing.a
ld: warning: ignoring file /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libvad.a, file was built for archive which is not the architecture being linked (i386): /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libvad.a
ld: warning: ignoring file /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libsystem_wrappers.a, file was built for archive which is not the architecture being linked (i386): /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libsystem_wrappers.a
ld: warning: ignoring file /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libsignal_processing.a, file was built for archive which is not the architecture being linked (i386): /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/audioprocess/libsignal_processing.a
duplicate symbol _kiss_fft in:
    /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/libspeexdsp.a(kiss_fft.o)
    /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/libcelt0.a(kiss_fft.o)
duplicate symbol _kiss_fft_alloc in:
    /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/libspeexdsp.a(kiss_fft.o)
    /Users/xx/Downloads/AnyChatCoreSDK_iOS_r3673/sdk/libs/libcelt0.a(kiss_fft.o)
ld: 2 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

另外:
查看targets的build phases,发现libaudio_processing.a,libvad.a,libsystem_wrappers.a,libsignal_processing.a 这四个文件已经引用进去了。







作者: admin    时间: 2013-10-26 20:11
您好,请问编译SDK包里面标准的示例代码是否可以通过呢?
作者: fus53    时间: 2013-10-27 09:40
demo可以通过
作者: admin    时间: 2013-10-27 10:06
您好,请对比一下两个工程的项目配置信息,如GCC编译器类型等。




欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) Powered by Discuz! X3