here's basically what I do to build FB
I hope I didn't make any mistakes in writing down the instructions
========================================================
Download a mingw distribution and set up a bash shell
The only solution that I found is by using msys2, note that in this example, we copy a mingw distribution that's not part of msys2, therefore, it's not intended to be updated by using pacman.
I am assuming that msys2 will be installed in C:\msys64, which is the default.
First download msys2
https://sourceforge.net/projects/msys2/ ... e/downloadDownload the gcc toolchain version of your choice, in this example it's version 7.3.0
Download the 32-bit gcc toolchain 7.3.0
https://sourceforge.net/projects/mingw- ... v5-rev0.7zDownload the 64-bit gcc toolchain 7.3.0
https://sourceforge.net/projects/mingw- ... v5-rev0.7zInstall msys2
after installing msys2 do the following From the msys64 shell
pacman -Syu
pacman -S make
pacman -S patch
pacman -S git
pacman -S zip
pacman -S p7zip
Extract i686-7.3.0-release-win32-sjlj-rt_v5-rev0.7z into the msys64 folder
Extract x86_64-7.3.0-release-win32-sjlj-rt_v5-rev0.7z into the msys64 folder
Copy C:\msys64\mingw32\opt\lib\libffi-3.2.1\include\ffi.h into C:\msys64\mingw32\i686-w64-mingw32\include
Copy C:\msys64\mingw32\opt\lib\libffi-3.2.1\include\ffitarget.h into C:\msys64\mingw32\i686-w64-mingw32\include
Copy C:\msys64\mingw64\opt\lib\libffi-3.2.1\include\ffi.h into C:\msys64\mingw64\x86_64-w64-mingw32\include
Copy C:\msys64\mingw64\opt\lib\libffi-3.2.1\include\ffitarget.h into C:\msys64\mingw64\x86_64-w64-mingw32\include
download FB 32-bit
https://downloads.sourceforge.net/fbc/f ... z?downloadright-click on the archive -> 7-zip -> open archive
double-click on the fbc folder then selectct the bin, include and lib folders and drag&drop them into C:\msys64\mingw32
download FB 64-bit
https://downloads.sourceforge.net/fbc/f ... z?downloadright-click on the archive -> 7-zip -> open archive
double-click on the fbc folder then selectct the bin, include and lib folders and drag&drop them into C:\msys64\mingw64
=========================================================================================================
at this point you are ready to build FB, the first thing I do is build FB with the current toolchain and replace it, I do it twise
download the FB source by going to
https://github.com/freebasic/fbc with your web browser and download
after extracting the archive
launch mingw32.exe and cd into fbc-master
make rtlib
rm /c/msys64/mingw32/lib/freebasic/win32/*
cp lib/freebasic/win32/* /c/msys64/mingw32/lib/freebasic/win32
make
cp lib/freebasic/win32/* /c/msys64/mingw32/lib/freebasic/win32
cp bin/fbc.exe /c/msys64/mingw32/bin
make clean
make
cp bin/fbc.exe /c/msys64/mingw32/bin
cp -R tests tests2
make unit-tests GEN=gas
make log-tests GEN=gas
if all the tests passed, delete the test folder and rename the folder test2 to test, then
make unit-tests GEN=gcc
make log-tests GEN=gcc
make clean
if all the tests passed you are ready to build the windows standalone version
Open a new document in notepad and add the following text
ENABLE_STANDALONE=1
Save As "config.mk" into the folder fbc-master
Now go back to mingw32.exe and type
make
cd lib/win32
make
cd ../..
make mingw-libs
mkdir -p bin/win32
wget
http://www.godevtool.com/Gorc.zip7z e Gorc.zip
cp GoRC.exe bin/win32
cp /c/msys64/mingw32/bin/ar.exe bin/win32
cp /c/msys64/mingw32/bin/as.exe bin/win32
cp /c/msys64/mingw32/bin/dlltool.exe bin/win32
cp /c/msys64/mingw32/bin/gcc.exe bin/win32
cp /c/msys64/mingw32/bin/gdb.exe bin/win32
cp /c/msys64/mingw32/bin/gprof.exe bin/win32
cp /c/msys64/mingw32/bin/ld.exe bin/win32
cp -R /c/msys64/mingw32/libexec bin
cleanup libexec by deleting all except cc1.exe, then from the shell
============================================
almost forgot that for this toolchain you also need to copy libgcc_s_dw2-1.dll and zlib1.dll into the bin\win32 folder before you make bindist
the toolchain from Equation is free of dll dependencies
at this point I run the test suits as before and if all is well then
make bindist
======================================================================================================
build fbc-64bit
Rename fbc-master to fbc-master32
extract fbc-master again to have a clean copy
launch mingw64.exe and cd into fbc-master
make rtlib
rm /c/msys64/mingw64/lib/freebasic/win64/*
cp lib/freebasic/win64/* /c/msys64/mingw64/lib/freebasic/win64
make
cp lib/freebasic/win64/* /c/msys64/mingw64/lib/freebasic/win64
cp bin/fbc.exe /c/msys64/mingw64/bin
make clean
make
cp bin/fbc.exe /c/msys64/mingw64/bin
make unit-tests GEN=gcc
make log-tests GEN=gcc
make clean
if all the tests passed you are ready to build the windows standalone version
copy config.mk from fbc-master32 to fbc-master
make
make mingw-libs
mkdir -p bin/win64
copy GoRC.exe from fbc-master32 to fbc-master\bin\win64
cp /c/msys64/mingw64/bin/ar.exe bin/win64
cp /c/msys64/mingw64/bin/as.exe bin/win64
cp /c/msys64/mingw64/bin/dlltool.exe bin/win64
cp /c/msys64/mingw64/bin/gcc.exe bin/win64
cp /c/msys64/mingw64/bin/gdb.exe bin/win64
cp /c/msys64/mingw64/bin/gprof.exe bin/win64
cp /c/msys64/mingw64/bin/ld.exe bin/win64
cp -R /c/msys64/mingw64/libexec bin
cleanup libexec by deleting all except cc1.exe, then from the shell
at this point I run the test suits as before and if all is well then
make bindist