代码之家  ›  专栏  ›  技术社区  ›  Alexandre Beaulieu

ocunit(sentestingkit)错误文件不是必需的体系结构

  •  1
  • Alexandre Beaulieu  · 技术社区  · 16 年前

    我正在尝试构建一个使用ocunit运行测试但在链接时出现以下错误的项目:

    ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//SenTestingKit.framework/SenTestingKit, file is not of required architecture
    Undefined symbols:
      "_STComposeString", referenced from:
          -[ReaderTest testEmptyFile] in ReaderTest.o
          -[ReaderTest testReadOneLine] in ReaderTest.o
          -[ReaderTest testReadOneLine] in ReaderTest.o
    
      "_OBJC_CLASS_$_SenTestCase", referenced from:
          _OBJC_CLASS_$_ReaderTest in ReaderTest.o
          _OBJC_CLASS_$_ActionUserInfoReaderTest in ActionUserInfoReaderTest.o
      "_OBJC_METACLASS_$_SenTestCase", referenced from:
          _OBJC_METACLASS_$_ReaderTest in ReaderTest.o
          _OBJC_METACLASS_$_ActionUserInfoReaderTest in ActionUserInfoReaderTest.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    

    我以前可以用ocunit构建和运行,没有任何问题。这个问题本周出现了,但我不知道结果是什么变化。我试图用iphone sdk 3.2.1重新安装xcode,但没有成功。

    如果我得到了关于/library/frameworks/sentestingkit.framework/versions/a/sentestingkit的信息,我得到了“kind:unix可执行文件(powerpc)”。这往往表明为什么我有一个问题,因为我正在一个英特尔平台的架构x86_64。但是,我不明白它以前怎么会工作,然后就停止了工作…

    谢谢你的帮助。

    2 回复  |  直到 14 年前
        1
  •  1
  •   ken    16 年前

    你似乎已经建立了自己的SentestingKit副本,也许它有错误的架构。它位于/users/alexandrebeaulieu/workspaces/project/build/debug/sentestingkit.framework。

    当您使用共享的构建位置时,xcode更倾向于使用已构建到系统上安装的任何框架。

        2
  •  0
  •   James Dunay CC.    14 年前

    我也有同样的问题,只是突然“似乎”不知从哪里冒出来。但我找到的解决办法是做一个清洁和建设。

    产品清洁