Programming for Linux, Windows and Mac OS X

Joined
Jan 12, 2007
Messages
12
Reaction score
0
Points
1
Hi!

I want to program Applications that run on Linux, Windows and Mac OS X.
I mean I write them once and compile them once for each platform.
Is REALBASIC the only solution for this? Are there other alternatives?

Or maybe Java?

Cheers,
Tobi
 
Joined
Jan 4, 2006
Messages
1,385
Reaction score
146
Points
63
Location
Hamburg, Germany
Your Mac's Specs
MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)
Well, Java is a good one to start with. C++/C should work most of the time. However some libraries exist only for a specific platform. Here are couple of interesting tool.
 
Joined
Apr 25, 2003
Messages
1,301
Reaction score
62
Points
48
Location
The home of the free and the land that did for Bra
Your Mac's Specs
24"iMac, 15"MB-Pro, MacBook, G4 iMac, PM G5 2x2Ghz, G4 iBook & Some PCs
Hi!

I want to program Applications that run on Linux, Windows and Mac OS X.
I mean I write them once and compile them once for each platform.
Is REALBASIC the only solution for this? Are there other alternatives?

Or maybe Java?

Cheers,
Tobi

Java, Python or Mono (.NET) are the only real alternatives but it really depends on what sort of applications you want to write.

You may find this interesting if you are interested in web based apps:

http://en.wikipedia.org/wiki/Ruby_on_Rails

Amen-Moses

Edited to add:
I just realised you said you woulc compile them on each platform, if at all possible don't go down this route, the ones I list above actually run on all the different platforms without any recompilation.

It is possible to write cross platform C++ (check out some of the open source projects that advertise this to see how they do it) but in my experience they all end up with diverging code bases and version control becomes a mess.

If you do want to go the C route check out Mono.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
I have done just this, and have the same apps running on DOS, Linux xterm and Mac OS X terminal. These were all curses based xterm type interfaces of course.

For graphics environments, I think you could do well if you stick with C++ and GTK. GTK is supported on all of these platforms (think GIMP, which is the "G" in "GTK").
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
As far I as know, Realbasic is the only one that tries to get the interface right on each platform. It also gives you the ability to compile for all of the OS's on your development OS of choice. (I think think that now includes Linux.)

Your link added two I wasn't aware of, but I'd be curious how they do with getting the interface right.

I think Apples Java has some hooks or tricks to get the OS X interface right, or at least close.

As someone mentioned, it depends on what kind of coding you are doing. When you move up to the GUI things get more tricky. Also, even at the 'command line' level, some low level feature may not exist on all of your targets.

Lastly there is the issue of stability. You may find that on the OS you are developing on eveything works as expected, but when you run your application on another system, certain odd bugs appear. The tool I use at my day job has had this issue. I'm about to 'port' our application for the second time. I've moved it from Digital Unix, to Sun Solaris, and now to IBM AIX. I expect a few issues. I've also had issues with major version upgrades at times. It could be one or all of the tool, the database, and the OS version.

If you go forward with this, please let us know in a few months how it is working out.
 
Joined
Jan 22, 2007
Messages
37
Reaction score
1
Points
8
don't see too many people talking about the QT from trolltech - that is a beauty in coding styles, thinking, support.

it might miss a default serialization mechanism(as for .NET), but this can be easily fixable if to extend the MOC features.

personally don't live well with the ObjectiveC and its coding way - the only explanation I find for my self why they still use it is because they need somehitng that is theirs that only they will understand and pretend that if you don't understand it then it is too smart for you...

to write code is an art, to write code in ObjectiveC or alike is a business requirement to keep it up by obscuring how simple things are.
 
OP
R
Joined
Jan 12, 2007
Messages
12
Reaction score
0
Points
1
I'm using REALbasic now.

Pros:
  • Cross Platform works incredibly good.
  • Really easy and powerful
  • Very good support
Cons:
  • No Cocoa, Mac Apps are just ugly (Win and Linux Apps look good, though). And I have no idea wenn they are going to implement cocoa
  • buggy - Well, you can use it but it is frustrating sometimes
 
Joined
Aug 22, 2007
Messages
180
Reaction score
0
Points
16
Location
London,UK
Your Mac's Specs
13.3" MacBook Black
I did try Linux programming, I thought the best solution for Unix/Linux/Mac would be C++

I wasn't thinking about Windows, I think C++ may work for you.

Java may not be around in the future, it is popular now. Don't count on it!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top