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

AndrewThomas

macrumors newbie
Original poster
Jul 26, 2009
1
0
I'm try to figure out if I should work with xcode or C++ on the Mac.

As far as I know, xcode is exclusive for the mac. So last week I had to translate some C++ code to have a windows webserver run and compile on a linux machine. This was fairly easy, all I had to do was change a couple APIs and small parts of the structure. However, say I had a server written in xcode for the macintosh, and I need to translate it into something that can be run on a linux\windows machine, because xcode can't compile on linux or windows, I'd need to translate it into C++ correct? So this would result in not just changing the libraries and APIs used, but converting to whole new programming language, and due to the differences in C++ and xcode, restructure a large portions of my program. This is why I'd much rather choose C++ over xcode, but am I incorrect? If so, what can be a solution here? This is the case for many of my projects.
 
XCode is not a programming language, it is a GUI. Out of the box, it supports C, C++, Objective-C, Objective-C++, and Java. So if you use write XCode to write C++ code, then you have C++ code.
 
To answer your implied question, if you write a program in Objective-C (the standard language for GUI stuff on a Mac), then yes, you'll have to rewrite large parts of your code to get it to work on other systems. This is why a lot of developers will use C++ and Carbon.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.