discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objective-C runtime via FFI


From: Boris D.
Subject: Objective-C runtime via FFI
Date: Tue, 5 Mar 2024 20:02:55 -0800
User-agent: Mozilla Thunderbird

Hello, I am interested in interacting with the Objective-C runtime from other languages through FFI bindings.
In particular, I need to be able to load Foundation or other classes dynamically. What needs to be done to load these classes in the runtime? Here's an example illustrating the issue I'm facing:
// clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` simple.c -o simple
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
Class c = objc_getClass("NSObject");
printf("Got a class: %s\n", c ? "pass" : "fail");
return 0;
}
Currently it fails.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]