Compile for one platform from another
Re: Compile for one platform from another
Look, the event handling under Windows is different than under Mac and Linux.
There are codes that give you output on Windows, but no output on Linux and Mac, or it hangs, or is incomplete.
This is not a bug of PB.
You don't ask for a feature, you ask for things that don't work, since the OS internally work differently !
Another thing, for example.
Linux has gtk3, which technically can never be absolutely compatible with Mac or Windows, because it works completely different.
Now comes gtk4, which makes the gap even wider.
That's why there is now qt for PB, but that's not a solution for the future either.
The OS will become further and further apart:
And then try marrying a fox to a duck
Best regards Saki
There are codes that give you output on Windows, but no output on Linux and Mac, or it hangs, or is incomplete.
This is not a bug of PB.
You don't ask for a feature, you ask for things that don't work, since the OS internally work differently !
Another thing, for example.
Linux has gtk3, which technically can never be absolutely compatible with Mac or Windows, because it works completely different.
Now comes gtk4, which makes the gap even wider.
That's why there is now qt for PB, but that's not a solution for the future either.
The OS will become further and further apart:
And then try marrying a fox to a duck
Best regards Saki
地球上の平和
- the.weavster
- Addict
- Posts: 1537
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England
Re: Compile for one platform from another
I'm asking to be able to cross-compile not for Linux executables to magically run on Windows.Saki wrote:Look, the event handling under Windows is different than under Mac and Linux.
There are codes that give you output on Windows, but no output on Linux and Mac, or it hangs, or is incomplete.
This is not a bug of PB.
You don't ask for a feature, you ask for things that don't work, since the OS internally work differently !
Another thing, for example.
Linux has gtk3, which technically can never be absolutely compatible with Mac or Windows, because it works completely different.
Now comes gtk4, which makes the gap even wider.
That's why there is now qt for PB, but that's not a solution for the future either.
The OS will become further and further apart:
And then try marrying a fox to a duck
Best regards Saki
Re: Compile for one platform from another
But that doesn't make sense if you can't test the codes on every OS.
And there is no difference between testing and compiling.
And there is no difference between testing and compiling.
地球上の平和
-
- Enthusiast
- Posts: 271
- Joined: Thu Dec 17, 2009 12:00 pm
- Location: Llangadog, Wales, UK
- Contact:
Re: Compile for one platform from another
I don't see anything wrong with making a Request, including this one. Some things may be easy, other things not possible. At the very least requests bring an awareness and discussion of peoples wishes and needs. Even if a request is never fulfilled, other good things may spin out of it. Only my opinion!the.weavster wrote:Oh, OK then... perhaps Fred should just shut down the Feature Requests and Wishlists section of the forum <eye-roll>
Personally I'm already happy with the results from working on three platforms, but always there could be scope for further improvements.
- the.weavster
- Addict
- Posts: 1537
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England
Re: Compile for one platform from another
Actually it's what you thought I meant that didn't make any sense - why would I want to run a Linux executable on Windows when I could just compile a Windows executable?Saki wrote:But that doesn't make sense if you can't test the codes on every OS.
And there is no difference between testing and compiling.
Cross-compiling is a perfectly reasonable request and it's not something novel or extraordinary.
@Tenaja gave a very clear explanation of why Fred might see it as too burdensome and I appreciate the point.
Re: Kompilieren für eine Plattform von einer anderen
There are licensing problems and it is not possible for technical reasons.
There is nothing more to say about this.
Best Regards Saki
There is nothing more to say about this.
Best Regards Saki
地球上の平和
Re: Compile for one platform from another
You are not the first to request this, and also not the first to get it denied--and probably also not the last. Just because this one request is not honored is no reason to Throw the Baby Out With the Bathwater.the.weavster wrote:Thanks for the perspective.Tenaja wrote:Technically, it's possible. It seems he finds the maintenance overwhelming, which is understandable. He'd have to port the generation libraries to every platform, do there'd be nine instead of three... And if you add the recently promised arm output, it will be sixteen instead of four. Or, cumbersome #CompilerIfPlatform=TheRightOne statements.
Oh, OK then... perhaps Fred should just shut down the Feature Requests and Wishlists section of the forum <eye-roll>mk-soft wrote:We should be happy with what we have with Purebasic.
My guess is mk-soft is referring to the fact that we have the best and most long-standing cross-platform compiler, and we are blessed that most code compiles on all three platforms with very few edits. With a fourth on the horizon, Fred is undertaking his largest project yet (probably even larger than Spider Basic), and he's unlikely to stop and make a change that won't improve the code output
Re: Compile for one platform from another
If you want an application to run on all OS, you need a common framework, which also runs on all OS. (Just like JAVA runtime environment).
But for the application to run, the huge framework must first be installed.
I think we don't want that either.
There is a project somewhere, where a Windows version is compiled under Linux. But for this you have to install the runtime environment for Windows (Wine). With macOS it won't work that way, because there is no such thing.
But for the application to run, the huge framework must first be installed.
I think we don't want that either.
There is a project somewhere, where a Windows version is compiled under Linux. But for this you have to install the runtime environment for Windows (Wine). With macOS it won't work that way, because there is no such thing.
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: Compile for one platform from another
However, Wine must then also be 100% compatible.
It simply doesn't make sense, then you can compile on Wine,
because you have to check if the code of both OS are working properly anyway.
It simply doesn't make sense, then you can compile on Wine,
because you have to check if the code of both OS are working properly anyway.
地球上の平和
Re: Compile for one platform from another
Has anybody tried their wsl for pb?Saki wrote:However, Wine must then also be 100% compatible.
It simply doesn't make sense, then you can compile on Wine,
because you have to check if the code of both OS are working properly anyway.
- the.weavster
- Addict
- Posts: 1537
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England
Re: Compile for one platform from another
mk-soft wrote:But for this you have to install the runtime environment for Windows (Wine). With macOS it won't work that way, because there is no such thing.
https://www.winehq.org/WineHQ wrote:Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD..
* edit *
If you have an Android smartphone with an intel processor you can use the Wine app to run windows programs on that too:
https://dl.winehq.org/wine-builds/android/
Re: Compile for one platform from another
YesTenaja wrote:Has anybody tried their wsl for pb?
Code: Select all
C:\>wsl
$:/mnt/c$
$:/mnt/c$ uname -a
Linux HPM 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 GNU/Linux
$:/mnt/c$ cd /tmp
$:/tmp$
$:/tmp$ curl -O https://www.purebasic.com/download/purebasic-demo_x64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 37.0M 100 37.0M 0 0 5615k 0 0:00:06 0:00:06 --:--:-- 8970k
$:/tmp$ ls -l
total 38016
-rw-rw-rw- 1 marc marc 38875885 Jun 24 11:32 purebasic-demo_x64.tar.gz
$:/tmp$ tar xvzf purebasic-demo_x64.tar.gz
purebasic_demo/
purebasic_demo/README
purebasic_demo/launch.sh
...
$:/tmp$ cd cd purebasic_demo/compilers/
$:/tmp/purebasic_demo/compilers$ ./pbcompiler
PureBasic 5.72 (Linux - x64) Free - (c) 2020 Fantaisie Software
A filename must be specified.
pbcompiler -h for help.
$:/tmp$ vi Hello.pb
PrintN("Hello World in WSL")
<Esc>:wq
$:/tmp/purebasic_demo/compilers$ ./pbcompiler Hello.pb
******************************************
PureBasic 5.72 (Linux - x64) Free
******************************************
Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.
pfff...
But I think it should work (at least for console applications) if you make some adjustments.