2009-03-05 67 views
1

我跟克里斯·汉森的advice约在Xcode 3.1调试框架单元测试,而是试图运行自定义的可执行文件,程序崩溃时,说明下面的错误消息[为构建产品的实际位置取代$(BUILD_PRODUCTS_DIR)。是什么导致在Mac OS X上找不到合适的图像错误?

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. 

我的问题是,什么导致找不到合适的图像。发现:...错误消息,我怎样才能让otest可执行文件正确运行,以便我可以调试我的框架单元测试?

是否有更简单的方法使用otest与做出来的呢?

回答

6

otest运行得很好。该错误是告诉你,它不能加载的测试包,那为什么不能加载测试包的原因是因为它不知道它运行的架构。

的解决方案是建立在ARCHPREFERENCE otest的环境。您可以在Xcode的自定义可执行文件编辑器中执行此操作将其设置为您想要在其下运行测试的体系结构。

+0

工作就像一个魅力。谢谢,彼得! – 2009-03-06 21:01:58

0

线Unit Tests.octest could not be loaded because it is built for a different architecture than the currently-running test rig会建议的依赖是一组具有不同的系统 - 也许这是一个PPC /英特尔不匹配或类似的?

相关问题