Original date:2019-01-24 22:12:32 Edited by: irv Subject: Re: What is the status of Euphoria V4.10?

archeopteryx_08 said...

Well, now that you mention an itch, I've always wanted to know how to create a cross-platform program. I've only ever written programs for Windows - and console ones at that. Suppose i write something that gets user input (eg their height in feet/inches) and displays the result of some processing (eg their height in cm). How do i make it work on a Linux and a Mac console? Do i need to add some extra code and, if so, can i see some minimalist source to see what i need to do? Do i need to have a Linux and a Mac computer and bind, shroud, or compile the original program on all three machines separately and then supply the executable that's relevant to them? That would be my itch...


Cross-platform programs are pretty easy with EuGTK. If you're reading or writing files, the file paths have to be different, but it's easy to work around that. Otherwise, the rest of the code is the same.

Writing a console program can actually be more difficult, due to the different console control characters, different consoles, etc. on Win/Linux/OS-X. I'd stick with a GUI.

Now, if you're going to bind or compile the program, obviously they must be compiled for each platform, and perhaps a 32-bit and a 64-bit version of each as well.

It is possible to cross-compile, but I have never done that, except to compile EuGTK programs on my Linux machine to run on my Raspberry Pi. Since the RPi has only a small amount of memory, compiling tends to be slow. It's a bit tedious, and since you've got to run your program on the various platforms anyway to be sure things work correctly, it's usually easier to just compile or bind on those platforms directly.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu