[Gambas-user] Gambas3 and Cross-Compiler
T Lee Davidson
t.lee.davidson at gmail.com
Mon Oct 2 16:54:37 CEST 2023
On 10/2/23 08:00, Admin wrote:
> Man, I have a department at work, dedicated to make our Gambas-powered software run on Windows. That's how of a pain it is.
> That's how ancient the problem is. I'm no Benoit, I can't explain why exactly this is
> impossible, as he says it is, but if he says, then I believe.
>
> For now, thank Microsoft for that (did I just really said that?), WSL2 provides almost painless way of running gambas software
> on Windows 10/11. You literally do it with a mouse. Just click on Microsoft Store, then click to install Store version of WSL
> (it's important. The one that's in Windows Components is VERY outdated and basically does not work at all) than click to install
> Debian or Ubuntu, and there you go, you can just type "bash" in start menu or in cmd, and you are in Linux. sudo apt update &&
> sudo apt install gambas3 - and your Windows now has Gambas. Since some time ago WSL does not require an X11 server to run GUI
> software, it already has Wayland, so you just run a gambas qt5 or gtk3 program compiled in Linux - and it just works, just shows
> up and runs as it does in Linux.
>
> It used to have problems with DISPLAY environment, it does not anymore. It used to have a problem with keyboard layout
> switching, it does not anymore. It had problems with DPI window scaling, it almost does not anymore. It used to require a lot of
> PowerShell work to make Gambas software work in Windows, it does not anymore. With this simplicity achieved by Microsoft with
> WSL through this years, personally I think we don't have to ask Benoit to make Windows-version of Gambas again. It would
> certainly be very nice, but now it's not a requirement, there is a way.
>
> Debian or Ubuntu can now easily be a part on Windows, very seamlessly. I suggest you go that way.
>
> Dmitry.
Good information, Dmitry.
Additionally, Martin, there are a couple of pages on the Wiki that are related:
https://gambaswiki.org/wiki/howto/wsl
https://gambaswiki.org/wiki/howto/windows
If you *really* want to do cross-compilation, you might want to take a look at Zig (lang) which claims to be a drop-in
replacement C (cross-)compiler. It hasn't reached v1.0 yet, but is usable. I compiled a simple "hello world" program for an
embedded MIPS 24K SoC by simply specifying the correct target, and it worked flawlessly.
--
Lee
More information about the User
mailing list