2013-05-10 46 views
1

我編譯XBMC適用於iOS具有以下配置:編譯XBMC適用於iOS誤差之前令牌丟失的二進制運算符 「(」

$ CD $ HOME/XBMC $ CD工具/取決於 $ ./bootstrap $的./configure --host =手臂,蘋果達爾文 $使

我得到以下輸出:

>/bin/sh ../../libtool --tag=CC --mode=compile /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -DHAVE_CONFIG_H -I. -I../.. -I../../include/shairplay -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -I/Users/Shared/xbmc-depends/iphoneos6.1_armv7-target/include -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -I/Users/Shared/xbmc-depends/iphoneos6.1_armv7-target/include -MT libshairplay_la-dnssd.lo -MD -MP -MF .deps/libshairplay_la-dnssd.Tpo -c -o libshairplay_la-dnssd.lo `test -f 'dnssd.c' || echo './'`dnssd.c 
libtool: compile: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -DHAVE_CONFIG_H -I. -I../.. -I../../include/shairplay -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -I/Users/Shared/xbmc-depends/iphoneos6.1_armv7-target/include -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -I/Users/Shared/xbmc-depends/iphoneos6.1_armv7-target/include -MT libshairplay_la-dnssd.lo -MD -MP -MF .deps/libshairplay_la-dnssd.Tpo -c dnssd.c -fno-common -DPIC -o .libs/libshairplay_la-dnssd.o 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/dispatch/dispatch.h:49, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/dns_sd.h:140, 
       from dnssd.c:62: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/dispatch/base.h:103:44: error: missing binary operator before token "(" 
make[7]: *** [libshairplay_la-dnssd.lo] Error 1 
make[6]: *** [all-recursive] Error 1 
make[5]: *** [all-recursive] Error 1 
make[4]: *** [all-recursive] Error 1 
make[3]: *** [all] Error 2 
make[2]: *** [iphoneos6.1_armv7-target/src/lib/.libs/libshairplay.so.0.0.0] Error 2 
make[1]: *** [libshairplay] Error 2 
make: *** [target/.installed-iphoneos6.1_armv7-target] Error 2 

我發現dispatch.h 49線在此:

#include <dispatch/base.h> 

dns_sd.h 140線在這種:

#if _DNS_SD_LIBDISPATCH 
#include <dispatch/dispatch.h> 
#endif 

base.h 103線在這種:

#if defined(__has_feature) && __has_feature(objc_fixed_enum) 
#define DISPATCH_ENUM(name, type, ...) \  typedef enum : type { __VA_ARGS__ } name##_t 
#else 
#define DISPATCH_ENUM(name, type, ...) \  enum { __VA_ARGS__ }; typedef type name##_t 
#endif 

base.h 44線在此:

#define DISPATCH_SENTINEL __attribute__((__sentinel__)) 

dnssd.c這行62行:

#include <dns_sd.h> 
#define DNSSD_STDCALL 

我不明白爲什麼它在這裏抱怨二元運算符,這是XBMC的錯誤嗎?

回答

1

我是新來的鐺,但我設法解決這個問題。在文件的頂部

dnssd.c 

並粘貼下面的代碼:打開文件

#ifndef __has_feature   // Optional of course. 
    #define __has_feature(x) 0 // Compatibility with non-clang compilers. 
#endif 
#ifndef __has_extension 
    #define __has_extension __has_feature // Compatibility with pre-3.0 compilers. 
#endif 

這將改善與一些編譯器爲Clang Language documentation兼容性。

相關問題