What a coincidence! I have been struggling to get Objective C going on Windows for a few days now to test out some ideas I had regarding a LINQ like language in C, and it' has been an ordeal.

The only worthwhile runtime available (that doesn't depend of MinGW or some such) is libobjc2 from GNUstep. I decided to not use the full GNUstep Foundation since it is clearly bloated and reflects a very Java-esque sensibility of the 90s, not to mention it depends on third party libraries like libcurl and whatnot. However, it turns out that the root class NSObject is defined in Foundation itself, and you need a root class to get anywhere with the language.

Fine, I decided, I'll write my own lightweight root class. That turned out to be so much more than I bargained for. In the end, I have one that supports manual reference counting and ARC (GC would've meant dealing with Boehm, one problem at a time). https://gist.github.com/forksnd/264d80858ee98e6d44e89e8972c0...

However, it is clearly not done. I can't invoke an arbitrary method on an object through the smalltalk syntax (get compilation error) and trying to do it through objc_msgSend fails silently. I was just trying to get the method tracing working, but it seems like it requires pthread (so Linux only then?).

It's insane how trying to get a minimal working workspace in this language is so difficult. No, I don't want a huge framework, all I want is inline SmallTalk in C. No wonder this language never found any footing outside of Apple's walled garden.

Try ObjFW instead, a largely self contained set of tools and framework, and if I recall correctly it contains its own base root class.

I certainly managed to use it for some test programs a number of years ago.

https://objfw.nil.im/home

https://github.com/ObjFW/ObjFW

It requires MSYS2 on Windows which is now a whole new userspace to deal with. In addition, the MSYS2 compilers will output DWARF debug symbols (right?), which means none of the graphical debuggers (Visual Studio, RemedyBG, RADDbg, etc.) will work.

EDIT: Apparently, MSYS2's Clang has an option "-gcodeview" that can generate PDBs. Would try it tomorrow and see how it goes.

> I decided to not use the full GNUstep Foundation

This is why it has been an ordeal. I came to a similar impasse. It went away when I changed my mind. It's a little bloated I'll give you that, but it's not that bad. Certainly better than bootstrapping 10+ years worth of language features

> Certainly better than bootstrapping 10+ years worth of language features

That's the thing, I think ignoring those library features and rethinking the role of message passing OOP in plain C can actually lead to a much better language. But I do need a root class.

There is a huge opportunity cost there. But to each his own.