What is the difference between a binary file on different OS?
What is the difference between a binary file on different OS?
If I compiled a program on PureBasic v6.21 on different Linuxes (Arch, Mint, Fedora), how will they differ? The source code is the same and is converted to the same machine code. The files are different, sometimes they don't even run on another OS. Does the compiler import data from the current OS? Why is there such a difference?
Re: What is the difference between a binary file on different OS?
Although they all implement the common Linux kernel, each distro is compiled differently, and with different dependencies as well.
So, the toolchains, build configs, graphic systems, etc, would work differently.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 
Re: What is the difference between a binary file on different OS?
The GTK function call is compiled, but GTK itself is not added to the compiled file.
If you compile a function call, it's not the same as compiling different versions of GTK
If you compile a function call, it's not the same as compiling different versions of GTK
Re: What is the difference between a binary file on different OS?
You can use ldd to see the different needed/used libraries.
Re: What is the difference between a binary file on different OS?
There are different kernel versions for Linux. Therefore, there are also three different PureBasic versions for Linux.
The programme should therefore be compiled to match the Linux kernel version.
GTK-3 is still available on all versions. This means that the standard functions should run on the target system.
Exceptions may be OpenGL and Movie.
In this case, the missing runtime libraries must be installed on the target system.
Check this with "ldd" on the target system.
Unfortunately, the systray (libappindicator3-1) no longer works with Wayland. However, PureBasic is not alone in this. Other apps no longer work either.
Two different versions are also required for Linux Raspberry. One for Debian 12 and one for Debian 13 because of the WebGadget.

The programme should therefore be compiled to match the Linux kernel version.
GTK-3 is still available on all versions. This means that the standard functions should run on the target system.
Exceptions may be OpenGL and Movie.
In this case, the missing runtime libraries must be installed on the target system.
Check this with "ldd" on the target system.
Unfortunately, the systray (libappindicator3-1) no longer works with Wayland. However, PureBasic is not alone in this. Other apps no longer work either.
Two different versions are also required for Linux Raspberry. One for Debian 12 and one for Debian 13 because of the WebGadget.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: What is the difference between a binary file on different OS?
The kernel is not guilty
Else all programs needs to available double if you boot for example with a 5. kernel instead of a 6. kernel after you updated your distribution.
Else all programs needs to available double if you boot for example with a 5. kernel instead of a 6. kernel after you updated your distribution.
Re: What is the difference between a binary file on different OS?
Okay, the kernel is not to blame.infratec wrote: Mon Dec 01, 2025 8:57 am The kernel is not guilty![]()
Else all programs needs to available double if you boot for example with a 5. kernel instead of a 6. kernel after you updated your distribution.
But usually, after a new kernel is released, there is also a new distribution and new libraries.
In this case, older versions of libraries may be removed.
For example, libwebkit2gtk-4.0 no longer exists in Debian 13.
This means that the programme must be compiled with PB Linux3, which then uses libwebkit2gtk-4.1.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive

