WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

User projects written in or related to FreeBASIC.
Post Reply
fxm
Moderator
Posts: 12083
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by fxm »

Using 1.9.1:
Errors 0 Warnings 0
Successful Compile (Errors 0 Warnings 0)

Primary Source: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas
Target Compilation: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.exe (28 Ko, 28672 bytes)
Compile Time: 0,1 seconds (2019-11-10 05:27:12)

Command Line:
C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\fbc32.exe -m "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas" "" -v -s console -i ".\FreeBASIC-1.06.0\inc\Afx"

FreeBASIC Compiler - Version 1.06.0 (02-17-2019), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas -o C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.asm (main module)
assembling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\bin\win32\as.exe --32 --strip-local-absolute "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.asm" -o "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.o"
linking: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\bin\win32\ld.exe -m i386pe -o "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.exe" -subsystem console "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\fbextra.x" --stack 1048576,1048576 -s -L "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32" -L "." "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crt2.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crtbegin.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\fbrt0.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.o" "-(" -lfb -lgcc -lmsvcrt -lkernel32 -luser32 -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crtend.o"
Using 1.9.8:
Errors 1 Warnings 0
Failed Compile (Errors 1 Warnings 0 [2019-11-10 05:28:37])

Command Line:
C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc32.exe -m "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas" "" -v -s console -x "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.exe"
  • (nothing else is displayed in Compiler Log File)
fxm
Moderator
Posts: 12083
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by fxm »

With 1.9.1 version, there is in addition the option "-i" (path to search for include files):
-i ".\FreeBASIC-1.06.0\inc\Afx"
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by PaulSquires »

Thanks fxm, sadly now I am I even more confused because I can't yet understand why it works on your machine but not mine.
IvanisIvan
Posts: 44
Joined: Nov 07, 2019 21:57

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by IvanisIvan »

Just curious,
How does FBE Editor and this program here differ from the FBIde compiler? I am simply new to freeBASIC and programming in general!
- Ivan :D
fxm
Moderator
Posts: 12083
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by fxm »

When I type the following as command line in a command window (same as previous command for version 1.9.8 which does not work, but with quotation mark around the compiler path and without option '-m'), that finally compiles and runs:
C:\Users\fxmam>"C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc32.exe" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas" "" -v -s console -x "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.exe"
FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas -o C:\Users\fxmam\Documents\Mes Outil
s Personnels\WinFBE_Suite\test.asm (main module)
assembling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\bin\win32\as.exe --32
--strip-local-absolute "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.asm" -o "C:\Users\fxmam\Docume
nts\Mes Outils Personnels\WinFBE_Suite\test.o"
linking: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\bin\win32\ld.exe -m i
386pe -o "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.exe" -subsystem console "C:\Users\fxmam\Docum
ents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\fbextra.x" --stack 1048576,1048576 -s -L "C:\
Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32" -L "." "C:\Users\fxmam\Docu
ments\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crt2.o" "C:\Users\fxmam\Documents\Mes Outils
Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crtbegin.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\
WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\fbrt0.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\te
st.o" "-(" -lfb -lgcc -lmsvcrt -lkernel32 -luser32 -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "C:\Users\fxmam\Document
s\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crtend.o"

C:\Users\fxmam>
Last edited by fxm on Nov 12, 2019 10:41, edited 2 times in total.
fxm
Moderator
Posts: 12083
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by fxm »

When using option '-m' (see documentation), the proper command line must be (works from a command window):
"C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc32.exe" -m "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas" -v -s console -x "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite\test.exe"

Example in documentation:
fbc -x foobar.exe -m baz foo.bas bar.bas baz.bas
or
fbc -m main_module -c main_module.bas
  • (Compile an object file main_module.o and mark it as an entry point)
So the main module file must be called twice in the command line:
- after compile option '-m', but without specified extension,
- and also like any module to compile, but there with its specified extension.

Any other syntax (for example the file extension also specified in the '-m' option field) does not work.

I did not understand how that could work before, but I do not know what's under the hood of WinFBE (behind the 'Compiler log File' window) !

I think this should be better highlighted on the 'Compiler Option: -m' documentation page.
[edit]
Done:
CompilerOptm → fxm [better highlighted its use]
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by PaulSquires »

Thanks fxm, I appreciate the advice on the -m switch. I made the changes but the compile still fails on my machine. In order to test, I am compiling from the command line (not using WinFBE at all). Here is the output:

Code: Select all

C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite>"C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.06.0\fbc32.exe" -m "C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\test" "C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas" -v -s console
FreeBASIC Compiler - Version 1.06.0 (02-17-2019), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target:       win32, 486, 32bit
compiling:    C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\test.bas -o C:\Users\rambotheman\Documen
ts\Mes Outils Personnels\WinFBE_Suite\test.asm (main module)
assembling:   C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.06.0\bin\win32\as.exe --32 -
-strip-local-absolute "C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\test.asm" -o "C:\Users\rambothe
man\Documents\Mes Outils Personnels\WinFBE_Suite\test.o"
Assembler messages:
Error: can't open Outils for reading: No such file or directory
Outils: Error: can't open Personnels\WinFBE_Suite\FreeBASIC-1.06.0\bin\win32\as.exe for reading: No such file or directory
assembling failed: 'C:\Users\rambotheman\Documents\Mes Outils Personnels\WinFBE_Suite\FreeBASIC-1.06.0\bin\win32\as.exe'
 terminated with exit code 1
 
As you can see, it is when AS.EXE is being called is where the failure occurs. Seems like it will not use the double quoted path but rather it takes the last word of the path (after the last space) and uses that instead (ie. Personnels\WinFBE_Suite\FreeBASIC-1.06.0\bin\win32\as.exe).

I will keep trying to find out why the paths with spaces is failing for me.
fxm
Moderator
Posts: 12083
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 7, 2019)

Post by fxm »

I noticed (3 times) that after certain erroneous command lines, the compilation was always aborting (even with a good command line), and that the WinFBE_Suite.rar file has to be reinstalled for that to work again (maybe the anti-virus did something?)

Otherwise, your command line above works on my PC (after replacing "rambotheman" by "fxmam" and "WinFBE_Suite" by "WinFBE_Suite-1.9.1"):
"C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\fbc32.exe" -m "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas" -v -s console
Console window output:
Microsoft Windows [version 10.0.17763.805]
(c) 2018 Microsoft Corporation. Tous droits réservés.

C:\Users\fxmam>cd C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1

C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1>"C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\fbc32.exe" -m "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas" -v -s console
FreeBASIC Compiler - Version 1.06.0 (02-17-2019), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.bas -o C:\Users\fxmam\Documents\Mes
Outils Personnels\WinFBE_Suite-1.9.1\test.asm (main module)
assembling: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\bin\win32\as.exe --32 -
-strip-local-absolute "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.asm" -o "C:\Users\fxmam\Do
cuments\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.o"
linking: C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\bin\win32\ld.exe -m i38
6pe -o "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\test.exe" -subsystem console "C:\Users\fxmam\D
ocuments\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\fbextra.x" --stack 1048576,1048576 -s -L "C
:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32" -L "." "C:\Users\fxmam\Docu
ments\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crt2.o" "C:\Users\fxmam\Documents\Mes Outils P
ersonnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crtbegin.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinF
BE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\fbrt0.o" "C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1\te
st.o" "-(" -lfb -lgcc -lmsvcrt -lkernel32 -luser32 -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "C:\Users\fxmam\Document
s\Mes Outils Personnels\WinFBE_Suite-1.9.1\FreeBASIC-1.06.0\lib\win32\crtend.o"

C:\Users\fxmam\Documents\Mes Outils Personnels\WinFBE_Suite-1.9.1>
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 17, 2019)

Post by PaulSquires »

Version 1.9.9 (November 17, 2019)
- Added: New method Form.ShowChild allows displaying a Form as a child (WS_CHILD). This allows forms to act like child panel controls.
- Added: ListView DoubleClick, RightClick events.
- Added: ListView Click event will now also fire if ENTER is pressed on a ListView line.
- Changed: ListView Columns.Add now only requires Text parameter with Width (default 100 pixels) and Alignment (TextAlignment.Left) being optional.
- Fixed: ListView Click event was not returning correct e.ListViewRow, e.ListViewColumn values.
- Fixed: When items are insert/remove from ListView/ListBox/ComboBox then their Index properties are now updated to accurately reflect their new position within the collections.
- Fixed: Bug in Replace All whereby start search position was incremented by length of the find phrase rather than the replace phrase.
- Fixed: Compile would fail if RichEdit exists in a project but no TextBoxes also exist in the project.

https://github.com/PaulSquires/WinFBE/releases
Coolman
Posts: 294
Joined: Nov 05, 2010 15:09

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 17, 2019)

Post by Coolman »

WinFBE does not work with Wine under linux but most of the examples provided work perfectly. I used FBEdit to compile them. for information purposes.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 17, 2019)

Post by dodicat »

Observation:
When using the freebasic command Exec to run something (e.g. run fbc.exe to compile a file), I notice that the chr(34) is not needed around the compiler path (The compiler path may include spaces).
But a distinct chr(32,34) is needed around the file path.
I put an old compiler in a folder called F B on the desktop and tested via exec.(and ShellExecute)
viz:

Code: Select all


#define WIN_INCLUDEALL
#include "windows.bi"
dim as string fbpath="C:\Users\User\Desktop\F  B\FreeBASIC-1.05.0-win32\fbc.exe"
dim as string switches="-gen gcc -Wc -O3"
dim as string file=chr(32,34)+"C:\Users\User\Desktop\F  B\New Document.bas"+chr(34,32)
print fbpath+file+switches

 Err= Exec (fbpath,file+switches)
 print err 'OK=0
 
 
 var h= ShellExecute (0,"",fbpath,file+switches,"",SW_SHOWNORMAL)

 print h '=42 here OK
 sleep
 
The same rule applies to ShellExecuteExW and wide strings, although the return value of ShellExecuteExW seems to be 1 even with a compile fail.

Code: Select all

#define WIN_INCLUDEALL
#include "windows.bi"
#include "file.bi"
dim as wstring * 400 fbpath="C:\Users\User\Desktop\F  B\FreeBASIC-1.05.0-win32\fbc.exe"
dim as wstring * 200 switches="-gen gcc -Wc -O3"
dim as wstring * 400 file=(chr(32,34)+"C:\Users\User\Desktop\F  B\New Document.bas"+chr(34,32))
dim as wstring * 600 fands=file+switches
print fbpath+file+switches

dim as any ptr h

goto skip  'to test ShellExecuteExW only

 Err= Exec (fbpath,file+switches)
 print err 'OK=0
 
 
  h= ShellExecute (0,"",fbpath,file+switches,"",SW_SHOWNORMAL)
 print h '=42 here OK
 
 
 
 skip:
 Dim Info As SHELLEXECUTEINFOW  

   ' compile to EXE
   With Info
      .cbSize       = Len(SHELLEXECUTEINFOW)
      .fMask        = SEE_MASK_NOCLOSEPROCESS
      .HWnd         = 0
      .lpVerb       = Null
      .lpFile       = @fbpath
      .lpParameters = @fands'(file+switches)
      .lpDirectory  = 0
      .nShow        = SW_SHOW
      .hInstApp     = 0 
   End With
   
   
   print (ShellExecuteExW(@Info)) 
  
   sleep 2500
   print fileexists("C:\Users\User\Desktop\F  B\New Document.exe")
   
   sleep
   kill "C:\Users\User\Desktop\F  B\New Document.exe"
  
 sleep  
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 21, 2019)

Post by PaulSquires »

Version 2.0.0 (November 21, 2019)
- Added: New Project template options: None; Blank Document; Visual Designer; Console; Windows DLL; Static Library.
- Added: ListView sort (ascending or descending) by a specified SubItem column index. ListView.Items.SortByColumn( nSortColumn, bSortAscend ).
- Added: ListView Click event now sets e.KeyChar = 13, e.KeyCode = VK_RETURN, whenever ENTER is pressed on a selected row.
- Fixed: ListView would "automatically" select the row under the cursor even if you don't click on it. Fix required removing the ListView MouseHover event.
- Fixed: "Open Templates" menu option was disabled if no file/project was already opened.
- Fixed: Removed extra separator bar between the "Replace" and "Goto Line" top menu items.

https://github.com/PaulSquires/WinFBE/releases
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 17, 2019)

Post by jj2007 »

dodicat wrote:The same rule applies to ShellExecuteExW and wide strings, although the return value of ShellExecuteExW seems to be 1 even with a compile fail.
Interesting. I was about to write "the return value must be greater than 32", but ShellExecuteExW behaves much different than ShellExecuteW.
Peter19Doof56NL
Posts: 1
Joined: Nov 25, 2019 12:34

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 21, 2019)

Post by Peter19Doof56NL »

Hello Paul,

In WinFBE editor win64 does not open the window Templates, the WinFbe editor win32 this works fine both on win 10 64
home edition.
Kirby
Posts: 1
Joined: Dec 02, 2019 10:50

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 21, 2019)

Post by Kirby »

Hi!

FreeBASIC Newbie here, just installed WinFBE.

Looks pretty good so far, but I wonder how the autocomplete and code tip popups work, I can't seem to find any ^^"

Thanks!
Post Reply