discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Objective-C without an actual compiler


From: Dr. H. Nikolaus Schaller
Subject: Re: Objective-C without an actual compiler
Date: Sat, 25 Oct 2014 08:07:07 +0200

Am 25.10.2014 um 02:10 schrieb Ingwie Phoenix <ingwie2000@googlemail.com>:

> Hey.
> 
> I just came across an email on Clang, where they talked about how ObjC is 
> translated into C - then compiled. I just wondered if there is a 
> general-purpose tool to „convert“ ObjC code into plain C (or C++)?

AFAIR, 10 years ago there was POC (portable object compiler): 
http://users.telenet.be/stes/compiler.html
I think you can install and run it on Linux to translate to C and then add that 
C code to your Windows sources.

But it has some extensions (Blocks) that are not compatible with objc-2 as 
defined by Apple. And I have no idea how complete it is or works.

> 
> I am mainly asking, since I am looking for a way to incoroperate ObjC within 
> a Windows project without having to install a bunch of other tools. I did try 
> Clang, but I was thrown over with errors and gave up on it’s MSVC driver.

Something to consider is that obj-c expects a runtime library (libobjc) and the 
compiler generates C function calls for that (objc_sendMsg). So you have to 
statically link that as well.

— hns


reply via email to

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