代码之家  ›  专栏  ›  技术社区  ›  Mike Caron

是什么导致Mac OS X上出现未找到合适映像的错误?

  •  1
  • Mike Caron  · 技术社区  · 17 年前

    advice 关于在Xcode 3.1中调试框架单元测试,但在尝试运行自定义可执行文件时,程序崩溃,并显示以下错误消息[用$(BUILD_PRODUCTS_DIR)替换了构建产品的实际位置]。

    2009-03-02 19:56:03.414 otest[28059:10b] Error loading
        $(BUILD_PRODUCTS_DIR)/Debug/Unit Tests.octest/
        Contents/MacOS/Unit Tests: dlopen($(BUILD_PRODUCTS_DIR_)/Unit
        Tests.octest/Contents/MacOS/Unit Tests, 265):
        no suitable image found. Did find:
        $(BUILD_PRODUCTS_DIR)/Unit Tests.octest/Contents/MacOS/Unit Tests:
        mach-o, but wrong architecture
    2009-03-02 19:56:03.561 otest[28059:10b] The test bundle at
        $(BUILD_PRODUCTS_DIR)/Unit Tests.octest could not be loaded because
        it is built for a different architecture than the currently-running
        test rig (which is running as unknown).
    2009-03-02 19:56:03.568 otest[28060:203] *** NSTask: Task create for path
        '$(BUILD_PRODUCTS_DIR)/Unit Tests.octest/Contents/MacOS/Unit Tests'
        failed: 8, "Exec format error". Terminating temporary process.
    

    错误消息以及如何获取

    2 回复  |  直到 17 年前
        1
  •  6
  •   Peter Hosey    17 年前

    ,它无法加载测试包的原因是它不知道它以什么架构运行。

    ARCHPREFERENCE

        2
  •  0
  •   Andy Mikula Eric Mickelsen    17 年前

    线路 Unit Tests.octest could not be loaded because it is built for a different architecture than the currently-running test rig