啊?
谷歌没有回复这个错误是什么...所有我正在做的是添加一个电影播放器控制器到翻转的iPhone应用程序。
cc1obj: error: type '({anonymous})' does not have a known size
{standard input}:228:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_9" minus "L00000000004$pb"
{standard input}:228:symbol: "L_OBJC_SELECTOR_REFERENCES_9" can't be undefined in a subtraction expression
{standard input}:218:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_8" minus "L00000000004$pb"
{standard input}:218:symbol: "L_OBJC_SELECTOR_REFERENCES_8" can't be undefined in a subtraction expression
{standard input}:215:non-relocatable subtraction expression, "L_OBJC_CLASS_REFERENCES_2" minus "L00000000004$pb"
{standard input}:215:symbol: "L_OBJC_CLASS_REFERENCES_2" can't be undefined in a subtraction expression
{standard input}:207:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_7" minus "L00000000004$pb"
{standard input}:207:symbol: "L_OBJC_SELECTOR_REFERENCES_7" can't be undefined in a subtraction expression
{standard input}:203:non-relocatable subtraction expression, "L_OBJC_CLASS_REFERENCES_1" minus "L00000000004$pb"
{standard input}:203:symbol: "L_OBJC_CLASS_REFERENCES_1" can't be undefined in a subtraction expression
{standard input}:151:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_6" minus "L00000000003$pb"
{standard input}:151:symbol: "L_OBJC_SELECTOR_REFERENCES_6" can't be undefined in a subtraction expression
{standard input}:147:non-relocatable subtraction expression, "L_OBJC_CLASS_FlipsideViewController" minus "L00000000003$pb"
{standard input}:147:symbol: "L_OBJC_CLASS_FlipsideViewController" can't be undefined in a subtraction expression
{standard input}:116:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_4" minus "L00000000002$pb"
{standard input}:116:symbol: "L_OBJC_SELECTOR_REFERENCES_4" can't be undefined in a subtraction expression
{standard input}:110:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_5" minus "L00000000002$pb"
{standard input}:110:symbol: "L_OBJC_SELECTOR_REFERENCES_5" can't be undefined in a subtraction expression
{standard input}:80:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_2" minus "L00000000001$pb"
{standard input}:80:symbol: "L_OBJC_SELECTOR_REFERENCES_2" can't be undefined in a subtraction expression
{standard input}:74:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_3" minus "L00000000001$pb"
{standard input}:74:symbol: "L_OBJC_SELECTOR_REFERENCES_3" can't be undefined in a subtraction expression
{standard input}:67:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_1" minus "L00000000001$pb"
{standard input}:67:symbol: "L_OBJC_SELECTOR_REFERENCES_1" can't be undefined in a subtraction expression
{standard input}:64:non-relocatable subtraction expression, "L_OBJC_CLASS_REFERENCES_0" minus "L00000000001$pb"
{standard input}:64:symbol: "L_OBJC_CLASS_REFERENCES_0" can't be undefined in a subtraction expression
{standard input}:58:non-relocatable subtraction expression, "L_OBJC_SELECTOR_REFERENCES_0" minus "L00000000001$pb"
{standard input}:58:symbol: "L_OBJC_SELECTOR_REFERENCES_0" can't be undefined in a subtraction expression
{standard input}:54:non-relocatable subtraction expression, "L_OBJC_CLASS_FlipsideViewController" minus "L00000000001$pb"
{standard input}:54:symbol: "L_OBJC_CLASS_FlipsideViewController" can't be undefined in a subtraction expression
{standard input}:unknown:Undefined local symbol L_OBJC_CLASS_FlipsideViewController
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_0
{standard input}:unknown:Undefined local symbol L_OBJC_CLASS_REFERENCES_0
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_1
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_3
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_2
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_5
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_4
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_6
{standard input}:unknown:Undefined local symbol L_OBJC_CLASS_REFERENCES_1
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_7
{standard input}:unknown:Undefined local symbol L_OBJC_CLASS_REFERENCES_2
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_8
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_9
将编译器转换为clang(llvc)
我收到了这个内部编译器错误:分段错误
-(IBAction)clickedOpenMovie:(void)sender
{
NSString *myString = [NSString stringWithFormat:@"http://localhost:1935/mystream/mystream.sdp"];
NSURL *myURL = [NSURL URLWithString:myString];
[self playMovieAtURL:myURL];
}
答案 0 :(得分:1)
-(IBAction)clickedOpenMovie:(void)sender
那是错的。 void
表示没有类型,并且您不能将无类型的参数传递给函数。这可能是你从cc1obj那里得到的错误。
动作方法的正确签名是:
-(IBAction)clickedOpenMovie:(id)sender
id
是任何Objective-C对象的类型。
NSString *myString = [NSString stringWithFormat:@"http://localhost:1935/mystream/mystream.sdp"];
这都是错误的,因为那不是格式字符串,而且没有意义,因为你已经有了完成的字符串。剪切消息并直接将字符串分配给变量:
NSString *myString = @"http://localhost:1935/mystream/mystream.sdp";
只有在您拥有格式字符串并且需要将某些值拼接到其中时,才应使用stringWithFormat:
。
答案 1 :(得分:1)
对于其他任何人获取完全无效的错误消息:“type'({anonymous})'没有已知的大小”,这是因为你搞砸了一个方法原型。因此,在上述情况下,错误是由无意义(void)参数引起的。所有其他错误都是与第一个错误无关的链接错误。所以,检查一下你没有胖子(id)类型的东西。
答案 2 :(得分:0)
所以问题是我没有将框架添加到我的xcode项目中,因此链接的库不存在。