|Oct 13, 2004, 11:37 PM||#1|
compiling a pc app in a mac using c++???
im new to programing and learning c++ (Im using XCode to compile) I was wondering, If I want to program a pc application how can I compile it? using xcode? or do I need to use a pc to compile it?
and heres other question (maybe stupid but Im still learning...):
how much difference has the code between a mac and pc application, I mean If I already have the code of one application I made, how much of the code will I have to change to make it work on a pc, or if its a pc version how much code will I need to change to make it work on a mac.
for example I want to program a software that runs both on mac and pc, will the same code work or I'll have to make twice the work. I think the only differences are in the user interface, am I right?
I have a lot of people requesting me software for pc, but i want to code the applications in my mac. is this posible or should I get a pc (and beleive me, I dont like the idea...)
|Oct 13, 2004, 11:56 PM||#2|
Thats the main difference and the source of all your problems with code of pc and mac. The user interface are different. Except if you decide to use wxWidgets. I'm using it for a project I'm working on and tried the same code on both Linux and Mac. No problems what so ever. The only one I can think of is letting the code know where the libraries are. SUppose same thing will happen with windows.
But from a point of view code wise, everything that is crunching numbers should be ok on any platform. Differences can be how good the precision is on the platform. That what I can think of. Regarding your first question on compiling a pc app using xcode. You need to let know xcode where the libraries are that the app needs.
As long as you use C or C++ can't think of any change between windows and mac. (If I'm wrong please someone help with this) you might find yourself learning objective-c at some point. Have read that is what is used to program on the Mac.
Hope this make sense and should I be wrong feel free to correct me.
--MBP 2.4 GHz 4GB 500GB 7200 RPM Snow Leopard
|Oct 14, 2004, 04:08 PM||#4|
Yes, Java + Swing seems to be your answer. Straight C++ with no GUI is mostly the same, except for the little/big endian thing, but once you want to do something a little more complicated, and this does not just include GUI, you usually want to use some framework, like the Windows32 API or the Apple frameworks.
There are some cross platform frameworks for C++ (Trolltechs Qt is one), but the easiest solution for a developer is Java, because the Java frameworks are really quite powerful.
The main drawback with Java is that it sometimes requires people to install java in addition to you application. The speed of Java is almost as good as C++ now, if you know what you're doing, except for start up, which tends to be slower. Also, sometimes things aren't as platform independent as you would wish, so you have to test on all platforms, but that would be the case for all solutions for cross platform development.
And Java + Cocoa won't work on Windows either.
Someone get Nekkid™, now!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Flash created app in mac app store?||nitro912gr||Mac Applications and Mac App Store||5||Jun 18, 2011 08:19 AM|
|How to change a PC app for a mac?||robs132||Mac Applications and Mac App Store||3||Sep 7, 2009 03:33 PM|
|Pc app. on a Mac||The Macster||Mac Applications and Mac App Store||7||Aug 11, 2007 10:49 AM|
|Can't compile Hello world app in Xcode (First foray into mac coding)||NightLord||Mac Programming||6||May 21, 2006 03:32 AM|
|pc dvdr-105 in a mac?||alphaone||Macintosh Computers||2||Aug 19, 2003 04:20 AM|
All times are GMT -5. The time now is 03:50 PM.