2010-09-06 99 views
1

非常簡單的問題,但我似乎無法得到它的工作。SecurityKit問題,雪豹

想象下面的代碼,爲什麼編譯器會給我下面的錯誤?我已經導入了相關的頭文件,包含了框架。目標是10.6。

#import <Security/Security.h> 


- (void) snowLeopardCodeSignCheck 
{ 
    SecStaticCodeRef ref = NULL; 
} 



'SecStaticCodeRef' undeclared (first use in this function) 

error: expected ';' before 'ref' 

回答

2

因爲Security.h不包括任何會導致CSCommon.h包含在內的頭文件。您需要包含<Security/SecStaticCode.h>

您可能想要對此file a bug