On a 64-bit Linux installation, one can install both 32-bit and 64-bit FreeBASIC, however not both of them at the same time when following the default installation instructions (sudo ./install.sh -i) in the 'readme.txt' file that comes with the download.
Having both installed is a good thing for testing your code (e.g. before posting on the forum).
One can optionally specify the installation path with './install.sh -i [prefix]' (install FB into prefix directory).
What I did instead was:
* Run the default 32-bit install (sudo ./install.sh -i)
* Rename the 'fbc' executable to 'fbc32' (sudo mv /usr/local/bin/fbc /usr/local/bin/fbc32)
* Run the default 64-bit install (sudo ./install.sh -i)
* Rename the 'fbc' executable to 'fbc64' (sudo mv /usr/local/bin/fbc /usr/local/bin/fbc64)
In addition, the proper libraries need to be present or installed (see 'readme.txt').
Now I have both versions working:
Code: Select all
badidea@laptop:~$ ls -l /usr/local/bin/fb*
-rwxr-xr-x 1 root root 1186648 Jan 26 2016 /usr/local/bin/fbc32
-rwxr-xr-x 1 root root 1883968 May 4 23:12 /usr/local/bin/fbc64
badidea@laptop:~$ fbc32 --version
FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for linux-x86 (32bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
badidea@laptop:~$ fbc64 --version
FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for linux-x86_64 (64bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
The 'library files' (in /usr/local/lib/freebasic/) are installed each in there own sub-directory (linux-x86/ and linux-x86_64/), so no problem there as well.
Where the 'example files' on Linux go, I don't know. At least still in my unzipped downloads, which is ok.
Let me know if this way of installing fbc 32-bit and 64-bit together is unwise. So far, it seems to work fine.