Jump to content

Multi-platform language

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
31 replies to this topic

#1
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts
I want to start developing for multiple operating systems. I haven't found anything that will do this for Windows and Linux (maybe MAC in the future) other than Java. Is Java my only choice?

#2
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
Do you mean a language that's crossplatform, or a language with crossplatform functionality. If you're thinking about the last thing, then there's many of them. Take for example a language such as C, it's easily possible to make crossplatform, using the preprocessors. And so is it in many other languages. I'll show you a short example:
#if defined(__linux__)
    // Do something Linux-specific
#elif defined(_WIN32)
    // Do something Windows-specific
#else
    // Platform is not supported
#endif
If you're looking for crossplatform language like Java, then look into Python, PHP, Perl, and there's probably more.

#3
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts
Well, what I mean is to develop it on Windows. Then move the same code/IDE to Linux and recompile without having to change any code. Any ideas on that?

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
C++ with wxWidgets is an example of another option. You will have to compile at each destination, but should need little or no code tweaking.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests
RealBasic is another option you could look into. I have also heard of Delphi having something to create cross-platform applications with little code change.

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Kylix is the linux version of Delphi. Both of them are built on Object-Pascal, which has cross-platform implementations, and Lazarus has been built on that for GUI Object-Pascal programming.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts

"Crane" said:

Well, what I mean is to develop it on Windows. Then move the same code/IDE to Linux and recompile without having to change any code. Any ideas on that?
Look at the example, and the language suggestions I came with. If you're using the preprocessors like I showed you, you don't need to change your code, you can simply just re-compile it. I'll show you a full example, which can be compiled on both Windows and Linux - without touching the code.
#include <iostream>

int main()
{
	#if defined(_WIN32)
		std::cout << "Hello, user! Do you enjoy Windows?" << std::endl;
	#elif defined(__linux__)
		std::cout << "Hello, user! Do you enjoy Linux?" << std::endl;
	#else
		#error Sorry, user! Your OS isn't supported
	#endif

	return 0;
}
But yes, I know that this probably isn't what you're looking for. And that's why I suggested some other languages, like Python. In Python you don't need to do like I showed you in C++.

#8
LogicalVue

LogicalVue

    Newbie

  • Members
  • PipPip
  • 10 posts
If you're looking to create desktop applications for multiple platforms, REALbasicis a great way to go. It creates a fully native UI (unlike Java). It's also very easy to use.
Paul Lefebvre

LogicalVue Software, Inc.: REALbasic software, consulting and training
Software Made Simple: A REALbasic Blog
RBDevZone: Free software and articles for REALbasic

#9
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts
I'll give Realbasic a trie, it looks good. Hey LogicalVue, I see you have built your business around RealBasic. Is that all you do is realbasic? Just curious...

#10
LogicalVue

LogicalVue

    Newbie

  • Members
  • PipPip
  • 10 posts
Crane,

I don't just use REALbasic, although I certainly prefer to. I also use .NET (usually VB) and a few other random things.
Paul Lefebvre

LogicalVue Software, Inc.: REALbasic software, consulting and training
Software Made Simple: A REALbasic Blog
RBDevZone: Free software and articles for REALbasic

#11
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I've been messing around with RealBasic a little on my Mac. If you know Visual Basic at all RealBasic doesn't seem that hard to pick-up.

#12
gszauer

gszauer

    Programmer

  • Members
  • PipPipPipPip
  • 113 posts
Hmm...
I say go with java. That way you can just transfer your code from one platform to a nother. The current release is incredibly fast, and it will get better in the future.
Also, im not shure but i think RUBY might be a way to go....
Again not shure on the ruby part

~Aristotle said:

It is the mark of an educated mind to entertain a tought without accepting it
If my post was helpful, please help me build some rep Posted Image