【问题标题】:Can't build OCUnit in GNUstep/Win32 environment - objc/runtime.h not found无法在 GNUstep/Win32 环境中构建 OCUnit - 找不到 objc/runtime.h
【发布时间】:2009-06-03 21:28:53
【问题描述】:

我正在尝试对 MinGW shell 中构建的 Objective-c 类进行单元测试。由于 OCUnit 已被 Apple 用于 XCode,因此开发人员 Sen:te 现在似乎已经专注于这一点。所以,最后一个声称支持 GNUstep 的源发行版是 v27。

无论如何,我下载了 v27 压缩包并尝试在 MinGW 中构建。您首先必须使用名为 SenFoundation\GSmakefile 的文件构建 Sen:te 基础类。

它持续了一段时间,直到我得到:

 Compiling file SenInvocationEnumerator.m ...
 In file included from SenInvocationEnumerator.m:10:
 SenInvocationEnumerator.h:13:25: warning: objc/runtime.h: No such file or directory

据我所知,在我的 GNUstep 树或驱动器上的其他任何地方都没有这样的文件。

有没有人在这方面取得了成功,或者至少知道 objc/runtime.h 的来源?

【问题讨论】:

    标签: objective-c mingw gnustep ocunit


    【解决方案1】:

    通过更改以下#import 语句,我终于能够使用 GNUstep 构建 SenFoundation 库:

    在文件中:

    • SenClassEnumerator.h
    • SenInvocationEnumerator.h

      变化:

          #import <objc/runtime.h>
      

      收件人:

          #import <GNUstepBase/GSObjCRuntime.h>
      

    在文件中:

    • NSInvocation_SenTesting.m
    • NSObject_SenRuntimeUtilities.m

      变化:

          #import <objc/objc-class.h>
      

      收件人:

          #import <GNUstepBase/../objc/Object.h>
      

    在文件中:

    • SenClassEnumerator.m

      变化:

          #import <objc/objc-runtime.h>
      

      收件人:

          #import <GNUstepBase/../Foundation/NSObjCRuntime.h>
      

    【讨论】:

      猜你喜欢
      • 2015-09-28
      • 1970-01-01
      • 2013-08-14
      • 1970-01-01
      • 2018-05-08
      • 1970-01-01
      • 1970-01-01
      • 2013-02-09
      • 1970-01-01
      相关资源
      最近更新 更多