Porting Code (e.g. Java)
Hey, I'm new to Mac programming generally so pardon any stupidness and feel free to patronise as much as possible.
I was just wondering if porting windows based code (e.g. visual studio) can be done relatively easily? I realise it requires different libraries or whatever, but are there any standards that allow code to be moved from one platform to another?
I ask particularily as I'm coding in Java at the minute, using rubbish JCreator to compile it, and it would be great if the content could be copied and pasted to the nicer developer tool? Like open a Java project and include the Java files. Obviously it would steer clear of the interface builder but just give me the ability to work at home.
Any help appreciated.
I was just wondering if porting windows based code (e.g. visual studio) can be done relatively easily? I realise it requires different libraries or whatever, but are there any standards that allow code to be moved from one platform to another?
I ask particularily as I'm coding in Java at the minute, using rubbish JCreator to compile it, and it would be great if the content could be copied and pasted to the nicer developer tool? Like open a Java project and include the Java files. Obviously it would steer clear of the interface builder but just give me the ability to work at home.
Any help appreciated.
Java and most of its libraries are cross-platform. The same can't be said of many/most C++ libraries.
If you've got a Java app using Swing or the AWT for windowing, it should probably work just fine compiled by Project Builder (javac or jikes).
If you've got a Java app using Swing or the AWT for windowing, it should probably work just fine compiled by Project Builder (javac or jikes).
You should be able to copy and paste the code, but make sure that you use the Java Tool template, as you don't want to use the Cocoa libraries.
Steven
Steven
Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Sort of a reiteration of OSC's post, Java use a virtual machine that doesn't *need* porting to other platforms once you find the way you're using to run the program -- being a student, that's usually with Terminal 
All you really need to make Java code work is Project Builder and the Terminal. Then you're off.
C++ code ... you should realy "#if 0" your Library-specific lines and gradually introduce each library to see which ones are supported, but expect to rewrite a lot of the preprocessed-out code. Especially w/ VS C++, which I had the misfortune of using. Gaaaahhh.... MS needs to work on their compiler.
IMO, you haven't seen preprocessor spagetti until you try making a crossplat program with all variations in the same source files.
-"Sta7ic" Matt

All you really need to make Java code work is Project Builder and the Terminal. Then you're off.
C++ code ... you should realy "#if 0" your Library-specific lines and gradually introduce each library to see which ones are supported, but expect to rewrite a lot of the preprocessed-out code. Especially w/ VS C++, which I had the misfortune of using. Gaaaahhh.... MS needs to work on their compiler.
IMO, you haven't seen preprocessor spagetti until you try making a crossplat program with all variations in the same source files.
-"Sta7ic" Matt
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Help porting Puyo Puyo from Code warrior 8 to xcode | unknown | 7 | 4,494 |
Nov 14, 2005 05:04 AM Last Post: unknown |
|
| porting linux glut code to mac os x | zynek | 12 | 5,727 |
Jan 23, 2005 05:47 PM Last Post: zynek |
|

