PowerBASIC exes won't run
PowerBASIC exes won't run
I'm using Wine 6.01 on Linux mint 20.2 (64bit).
PowerBASIC is a 32bit application, and I'd heard reports that it runs well on Wine. However, although it installs fine and the IDE runs well and compiles sources, when I try to run the generated exes I get an error from the IDE : "Bad EXE", and when trying to execute them from the terminal I get "not supported on this system".
The error messages are the kind you get when trying to run a 64bit app on a 32bit system, or vice-versa. I installed a copy of PB on Windows 7 in VirtualBox, and no problems there, and the exes produced on W7 also run fine using Wine.
Just to be sure, I also installed PB on my netbook which runs 32bit Linux (Q4OS), and got the same error message.
PowerBASIC is a 32bit application, and I'd heard reports that it runs well on Wine. However, although it installs fine and the IDE runs well and compiles sources, when I try to run the generated exes I get an error from the IDE : "Bad EXE", and when trying to execute them from the terminal I get "not supported on this system".
The error messages are the kind you get when trying to run a 64bit app on a 32bit system, or vice-versa. I installed a copy of PB on Windows 7 in VirtualBox, and no problems there, and the exes produced on W7 also run fine using Wine.
Just to be sure, I also installed PB on my netbook which runs 32bit Linux (Q4OS), and got the same error message.
Re: PowerBASIC exes won't run
If it helps, I can provide "hello world" exes generated by PB on Wine and Windows 7. I don't know much about low-level stuff, but perhaps someone here may be able to analyse them for differences which may provide a clue to what's going on?
p.s. I'm away for a couple of days and won't be able to respond until Saturday.
p.s. I'm away for a couple of days and won't be able to respond until Saturday.
Re: PowerBASIC exes won't run
A simple sample program would be helpful.If it helps, I can provide "hello world" exes
Re: PowerBASIC exes won't run
Thanks for the reply. Here is the hello world program which you can find in the samples folder :
You don't actually need all those #RESOURCE lines, just #COMPILE EXE and the function PBMAIN. Here is the output from the IDE when I try to compile and run.

Thanks in advance for any help.
Code: Select all
'-------------------------------------------------------------------------------
'
' HELLO.BAS example for PowerBASIC for Windows
' Copyright (c) 1996-2021 PowerBASIC Tools, LLC
' All Rights Reserved.
'
'-------------------------------------------------------------------------------
#COMPILER PBWIN 10
#COMPILE EXE
' The resource gives the EXE program the "hello" icon in Explorer,
' and provides it with Windows version information.
#RESOURCE ICON, 100, "Hello.ico"
#RESOURCE VERSIONINFO
#RESOURCE FILEVERSION 10, 0, 0, 0
#RESOURCE PRODUCTVERSION 10, 0, 0, 0
#RESOURCE STRINGINFO "0409", "04B0"
#RESOURCE VERSION$ "Comments", "Hello, World Example"
#RESOURCE VERSION$ "CompanyName", "PowerBASIC Tools, LLC"
#RESOURCE VERSION$ "FileDescription", "Simple MSGBOX Application for Windows"
#RESOURCE VERSION$ "FileVersion", "10.0"
#RESOURCE VERSION$ "InternalName", "Hello"
#RESOURCE VERSION$ "LegalCopyright", "Copyright © 1996-2021 PowerBASIC Tools, LLC"
#RESOURCE VERSION$ "LegalTrademarks", "PowerBASIC ®"
#RESOURCE VERSION$ "OriginalFilename", "HELLO.EXE"
#RESOURCE VERSION$ "ProductName", "PowerBASIC Compiler for Windows"
#RESOURCE VERSION$ "ProductVersion", "10.0"
'
FUNCTION PBMAIN () AS LONG
MSGBOX "Hello, World!"
END FUNCTION

Thanks in advance for any help.
Re: PowerBASIC exes won't run
If I compile the script without the #RESOURCE lines, it does seem to work.
Soon I will take a look at why the #RESOURCE lines don't work.
Code: Select all
#COMPILER PBWIN 10
#COMPILE EXE
FUNCTION PBMAIN () AS LONG
MSGBOX "Hello, World!"
END FUNCTION
Re: PowerBASIC exes won't run
Yes, I tried several other programs in the sample folder and they all run after removing the #RESOURCE lines. Apparently this statement is new to version 10, so perhaps all reports I've seen regarding running PB on Wine have been from those using prior versions where the resources had to be compiled manually. I think this can still be done using version 10.
- DarkShadow44
- Level 9
- Posts: 1338
- Joined: Tue Nov 22, 2016 5:39 pm
Re: PowerBASIC exes won't run
So, the exes compiled on Wine don't run under Wine, but under Windows?
What if the exes are compiled under windows, do those run under Wine?
I'd test, but it's a paid program. Or is there a free demo/version?
What if the exes are compiled under windows, do those run under Wine?
I'd test, but it's a paid program. Or is there a free demo/version?
Re: PowerBASIC exes won't run
No, the exes compiled on Wine don't run on Windows (I get the same error message), but they do run in Wine if they are compiled on Windows. There isn't a trial version, but is it possible to send private messages?
- DarkShadow44
- Level 9
- Posts: 1338
- Joined: Tue Nov 22, 2016 5:39 pm
Re: PowerBASIC exes won't run
Interesting, so the executables themselves are broken when made with Wine. Good to know, but probably more annoying to find out.
I don't know about private messages, although I can be contacted via email. Can you please open a bugreport on bugs.winehq.org?
Re: PowerBASIC exes won't run
Hello,
I am actually using PB 9 ..and yes ..can report, that it runs on ReactOS ...which probably is an indicator, that it also runs on Wine
I am actually using PB 9 ..and yes ..can report, that it runs on ReactOS ...which probably is an indicator, that it also runs on Wine
Re: PowerBASIC exes won't run
Ok, I will open a bug report. Could you let me know your email address?I don't know about private messages, although I can be contacted via email. Can you please open a bugreport on bugs.winehq.org?
- DarkShadow44
- Level 9
- Posts: 1338
- Joined: Tue Nov 22, 2016 5:39 pm
Re: PowerBASIC exes won't run
I don't want to post it publicly, but I'll add myself to the bugreport and as registered user you can see it 
