New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Programming for Linux, Windows and Mac OS X


Post Reply New Thread Subscribe

 
Thread Tools
roggnroll

 
roggnroll's Avatar
 
Member Since: Jan 12, 2007
Posts: 12
roggnroll is on a distinguished road

roggnroll is offline
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
QUOTE Thanks
novicew

 
novicew's Avatar
 
Member Since: Jan 04, 2006
Location: Hamburg, Germany
Posts: 1,385
novicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to all
Mac Specs: MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)

novicew is offline
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.
QUOTE Thanks
Amen-Moses

 
Member Since: Apr 25, 2003
Location: The home of the free and the land that did for Braveheart.
Posts: 1,301
Amen-Moses is just really niceAmen-Moses is just really niceAmen-Moses is just really niceAmen-Moses is just really nice
Mac Specs: 24"iMac, 15"MB-Pro, MacBook, G4 iMac, PM G5 2x2Ghz, G4 iBook & Some PCs

Amen-Moses is offline
Quote:
Originally Posted by roggnroll View Post
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.
QUOTE Thanks
roggnroll

 
roggnroll's Avatar
 
Member Since: Jan 12, 2007
Posts: 12
roggnroll is on a distinguished road

roggnroll is offline
I've just visited Wikipedia:
There's a nice list:
http://en.wikipedia.org/wiki/Cross-p...gramming_tools

But they don't mention Realbasic
QUOTE Thanks
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,560
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM

mac57 is offline
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").

My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
QUOTE Thanks
nicu

 
Member Since: Jan 22, 2007
Posts: 37
nicu is on a distinguished road

nicu is offline
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.
QUOTE Thanks
roggnroll

 
roggnroll's Avatar
 
Member Since: Jan 12, 2007
Posts: 12
roggnroll is on a distinguished road

roggnroll is offline
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
QUOTE Thanks
MBNick

 
MBNick's Avatar
 
Member Since: Aug 22, 2007
Location: London,UK
Posts: 180
MBNick is an unknown at this point
Mac Specs: 13.3" MacBook Black

MBNick is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe


« error with port install gcc33 | XDarwin/X11 for Mac OSX »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Running Windows on a Mac: A Switcher's Guide UncSki1218 Running Windows (or anything else) on your Mac 80 06-10-2008 10:34 PM
What Apple Should Do To Support Windows On Mac haimson Running Windows (or anything else) on your Mac 6 08-31-2006 10:50 PM
Switcher Article in Today's Times studio34 Switcher Hangout 9 08-11-2006 03:10 PM
Running Windows on my iMac! BlindingLights Running Windows (or anything else) on your Mac 27 04-19-2006 05:40 PM
Mac Users Get More ISP Choices schweb Apple Rumors and Reports 1 03-06-2003 10:57 AM

All times are GMT -4. The time now is 01:59 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?