Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Is GNUStep the only way to make objective-c cross platform?

Is GNUStep the only way to make objective-c cross platform?
Thread Tools
TampaDeveloper
Dedicated MacNNer
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 16, 2004, 09:59 PM
 
Or could I use objective-c to write directly to the Win32 api? I read in the FAQ that objective-c can communicate with c++ fairly well on the Mac, with notable exceptions such as objc has no idea how to deal with virtual C++ methods.

But the million dollar question is; how hard is it to use the win32 api from objective-c and has anybody done it?

The reason I ask is that I'm beginning a new open source project that I want to be cross-platform. I would like to use objective-c just because I hear its got a good object implementation and I want the Mac implementation to tie directly to Cocoa. Performance is very important for this application, so I've ruled out Java (flame away).

Or would I be better off to write my project in C++ and use the Carbon API? I really don't want to do that, but if thats best for the windows port, then I guess I could swallow my pride and use the Carbon API....

Thanks for your help,

Tampa Developer
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Aug 16, 2004, 10:09 PM
 
The problem is really the API. KDE has ObjC bindings iirc, but not Cocoa/OpenSTEP ones.

<edit> I don't think Win32 supports ObjC though. ObjC++ would probably work </edit>
     
TampaDeveloper  (op)
Dedicated MacNNer
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 16, 2004, 11:51 PM
 
Originally posted by Catfish_Man:
The problem is really the API. KDE has ObjC bindings iirc, but not Cocoa/OpenSTEP ones.

<edit> I don't think Win32 supports ObjC though. ObjC++ would probably work </edit>
Yeah, I don't expect the API's to be the same. But if I can create @protocols that implementers must conform to, then its just a matter of implementing the proper classes for whichever machine I want to port to.

So am I better off with Carbon, just to allow Windows users a fighting chance on their inferior machines?
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 17, 2004, 06:12 AM
 
You're perfectly able to do what you say. In fact you could write your program entirely in Obj-C/Carbon if you wanted to. However, you're going to lose the benefit of Cocoa at least on Windows, and possibly on Mac OS X as well.
     
TampaDeveloper  (op)
Dedicated MacNNer
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 17, 2004, 12:01 PM
 
Thanks for the thoughts. You're all gonna think I'm nuts, but here's the reason I'm asking this question... This is my new project. Its very ambitious, but I have written a number of scripting languages, so its not a big step for me.


http://scrapie.sourceforge.net/
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:04 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,