代码之家  ›  专栏  ›  技术社区  ›  Dan

安全问题,雪豹

  •  1
  • Dan  · 技术社区  · 15 年前

    这个问题很简单,但我似乎不能解决。

    想象一下下面的代码,为什么编译器会给我下面的错误?我已经导入了相关的头文件,包括框架。目标是10.6。

    #import <Security/Security.h>
    
    
    - (void) snowLeopardCodeSignCheck
    {
        SecStaticCodeRef ref = NULL;
    }  
    
    
    
    'SecStaticCodeRef' undeclared (first use in this function)  
    
    error: expected ';' before 'ref'
    
    1 回复  |  直到 15 年前
        1
  •  2
  •   Peter Hosey    15 年前

    因为security.h不包含任何会导致包含cscommon.h的头文件。你需要包括 <Security/SecStaticCode.h> .

    你可能想 file a bug 关于这个。