|Oct 13, 2004, 10: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, 10: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, 03: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|
|Need help compiling c files||Paulie87||Mac Programming||27||Mar 11, 2014 08:00 PM|
|Compiling for Powerpc, how to?||skinniezinho||PowerPC Macs||12||Jun 21, 2013 04:10 AM|
|Cross compiling||DenBeke||Mac Programming||8||May 18, 2013 02:08 AM|
|compiling VTK on Mac Air||ilantal||OS X 10.8 Mountain Lion||3||Dec 18, 2012 07:04 AM|
|C++ compiling issues||Marcus89||Mac Programming||2||Sep 20, 2012 08:24 AM|
All times are GMT -5. The time now is 12:46 PM.