Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dragonlance1561

macrumors member
Original poster
I have been looking around on the web and I have seen mixed answers about Objective-C and Cocoa being compatible with windows and linux and other OS's. I'm thinking that Objective-C is while Cocoa is not. Am I correct?
 
Yes, you are correct. Objective C can be compiled on any platform with a suitable compiler, including windows and linux, but Cocoa is apple specific.
 
..Objective-C and Cocoa being compatible with windows and linux and other OS's. I'm thinking that Objective-C is while Cocoa is not.

You are correct.

Apple uses the Open Source gcc compiler as part of x-code. gcc runs on every computer and OS known to man (almost) and gcc does Objective-C (and C, C++, FORTRAN, Ada and Java as well). So the language itself is portable to every place that gcc runs.

Cocoa however is Mac-only.

OK
 
ok thanks, I'm learning C++ now, how transferable is knowledge of C++ to Objective-C? From what I have read it's quite transferable.

Also, can anyone point me to any websites or books that will teach me to make GUI's on other OS's (mostly windows) in Objective-C and/or C++?

I want to be able to write my source code on my mac so I can't use MS Visual C++ for windows. Linux isn't a big issue, mainly windows i want to run my programs on, and I know i can just use interface builder on mac. (but learning the hard way is always a bonus)

EDIT!: Even better would be books or websites about making cross-platform GUI's if possible.
 
ok thanks, I'm learning C++ now, how transferable is knowledge of C++ to Objective-C? From what I have read it's quite transferable.

Also, can anyone point me to any websites or books that will teach me to make GUI's on other OS's (mostly windows) in Objective-C and/or C++?

I want to be able to write my source code on my mac so I can't use MS Visual C++ for windows. Linux isn't a big issue, mainly windows i want to run my programs on, and I know i can just use interface builder on mac. (but learning the hard way is always a bonus)

EDIT!: Even better would be books or websites about making cross-platform GUI's if possible.

Windows uses Win32 or the .Net platform to do its GUI programming. Mac OS X uses Carbon or Cocoa. No matter what you do you will need to write separate code for the GUIs for each platform.

A better solution would be to use the Qt framework which is written in C++ and works on Windows, Mac OS X and Linux and would allow you to do all your GUI programming for all platforms on the Mac and would just require a recompile on the other platforms (assuming of course the rest of your code is platform agnostic).

Edit : Of course this means you won't be able to use Interface Builder at all but would need to use Qt Designer to build your GUIs. See http://www.trolltech.com/qt for more information.

Oh and as long as the applications you write are open source it is free. If you want to write commercial software you need to pay a license fee.
 
Edit : Of course this means you won't be able to use Interface Builder at all but would need to use Qt Designer to build your GUIs. See http://www.trolltech.com/qt for more information.
That sounds great to me. I would rather just learn C++ for now anyways.
Oh and as long as the applications you write are open source it is free. If you want to write commercial software you need to pay a license fee.
I am doing this for personal use and school work, no commercial use intended.

P.S.
(assuming of course the rest of your code is platform agnostic).
What does agnostic mean I never seen that word before.😱
 
What does agnostic mean I never seen that word before.😱

Well when used in the religious sense it means undecided basically. So when used in the programming sense it basically means cross platform compatible as you have not decided on which platform to use. Does that make sense?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.