Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't build OCUnit in GNUstep/Win32 environment - objc/runtime.h not found

I'm trying to unit test objective-c classes built in the MinGW shell. Since OCUnit has been embraced by Apple for XCode, it seems that the developer, Sen:te, has now focused on that. So, the last source distro that claims to support GNUstep is v27.

Anyway, I downloaded the v27 tarball and tried to build in MinGW. You first have to build the Sen:te foundation classes using a file called SenFoundation\GSmakefile.

It goes along nicely for awhile until I get:

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

As far as I can tell there is no such file in my GNUstep tree or anywhere else on my drive.

Has anybody had success with this, or at least is aware of where objc/runtime.h comes from?

like image 415
Buggieboy Avatar asked Nov 18 '25 01:11

Buggieboy


1 Answers

I was finally able to build the SenFoundation library with GNUstep by changing the following #import statements:

In files:

  • SenClassEnumerator.h
  • SenInvocationEnumerator.h

    Change:

        #import <objc/runtime.h>
    

    To:

        #import <GNUstepBase/GSObjCRuntime.h>
    

In files:

  • NSInvocation_SenTesting.m
  • NSObject_SenRuntimeUtilities.m

    Change:

        #import <objc/objc-class.h>
    

    To:

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

In file:

  • SenClassEnumerator.m

    Change:

        #import <objc/objc-runtime.h>
    

    To:

        #import <GNUstepBase/../Foundation/NSObjCRuntime.h>
    
like image 72
Buggieboy Avatar answered Nov 21 '25 09:11

Buggieboy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!