What FB 1.00 for Windows to use?

New to FreeBASIC? Post your questions here.
Posts: 15
Joined: Apr 12, 2011 3:36

What FB 1.00 for Windows to use?

Postby jmsiino » Sep 19, 2014 9:29

I've used FB in the past without paying too much attention to gcc or MinGW. I would like to compile both 32 bit and 64 bit programs. But I don't know what to install.

Looking at the install (binary) files it's hard to decide:

Windows Binaries
FreeBASIC-1.00.0-win32.exe 9212 kb
FB installer for Windows 32bit (x86).

FreeBASIC-1.00.0-win64.zip (or as .7z) 17543 kb
FB for Windows 64bit (x64).

gcc-4.9.1-for-FB-win32-gengcc.zip 7097 kb
32bit gcc for installation into the FB-win32 package, in case you want to use -gen gcc.

fbc-1.00.0-win32-mingw-org.zip (or as .7z) 3620 kb
32bit fbc for installation into MinGW, like a MinGW package. Built with MinGW.org toolchain.

fbc-1.00.0-win32-mingw-w64.zip (or as .7z) 3633 kb
32bit fbc for installation into 32bit MinGW-w64 toolchain.

fbc-1.00.0-win64-mingw-w64.zip (or as .7z) 1011 kb
64bit fbc for installation into 64bit MinGW-w64 toolchain.
Site Admin
Posts: 3210
Joined: Jul 28, 2005 14:45
Location: Germany

Re: What FB 1.00 for Windows to use?

Postby dkl » Sep 19, 2014 10:47


If you're just starting out, it may be best to use the FreeBASIC-win32 package for compiling 32bit programs, and the FreeBASIC-win64 package for compiling 64bit programs. In other words, install both in separate directories and switch as needed. Of course the FreeBASIC-win64 package only works on a 64bit system as the included tools themselves are 64bit.

Neither the FB-win32 nor the FB-win64 package is prepared to compile for both 32bit and 64bit out-of-the-box. Each package only contains tools and libraries for native compilation, but not for cross-compiling.

Nevertheless, it's possible to adjust them to allow cross-compiling. For example, if you have the FreeBASIC-win32 extracted, you can do the following:
  • Install the gcc-4.9.1-for-FB-win32-gengcc.zip package (gcc is needed for compiling for 64bit)
  • Copy the bin/win32/ directory to bin/win64/ (luckily, this is possible, because the bin/win32/ tools included in this FreeBASIC-win32 package also support cross-compiling to 64bit)
  • Copy the lib/win64/ directory from the FreeBASIC-win64 package into the directory of the FreeBASIC-win32 package (such that you have both lib/win32/ and lib/win64/)
Now it should be possible to compile native 32bit programs by default, and to cross-compile to 64bit by using the -target win64 or -arch 64 command line options.

In a similar way, you can adjust the FreeBASIC-win64 package for cross-compilation to 32bit.


In case you already have a MinGW-w64 toolchain installed anyways, then you don't need the full FreeBASIC-win32/win64 packages. Then you could just use the fbc-win32/win64 packages to add fbc, FB headers and the 32bit/64bit FB libraries to your MinGW-w64 directory.
Posts: 88
Joined: Jun 27, 2005 19:08

Re: What FB 1.00 for Windows to use?

Postby Aquarius » Sep 19, 2014 10:51

You can ignore files 4 5 and 6.

For 64 bit get this:
http://downloads.sourceforge.net/fbc/Fr ... p?download

For 32 bit get this:
http://downloads.sourceforge.net/fbc/Fr ... p?download
To use -gen gcc in 32 bit you also need this http://downloads.sourceforge.net/fbc/gc ... p?download

edit: dkl explained it better ;P
Posts: 15
Joined: Apr 12, 2011 3:36

Re: What FB 1.00 for Windows to use?

Postby jmsiino » Sep 20, 2014 2:55

Thank you both.
It's been a while since I did any programming, so I will do a fresh install of everything.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 0 guests