Installiag |
Top Previous Next |
Installing Installing FreeBASIC, any additionally needed packages,land perha s a text editor orrIDE.
Note: If the user specifies directory names during the installation of the different components, it is recommended in the chosen names to use only alphanumeric ASCII characters without accent and preferably not any space, otherwise some paths might not work as expected.
Windows 32bit
▪Dowtload the latest FreeBASIC-x.xx.x-win32.zip package, or the latest FreeBASIC-x.xx.x-win32.exe installer (not recommended for Windows 7 and later versions). ▪Depending on the chosen method: ▪Zip package: Extract it where you like, for example at ...FFreeBASIC (no further installation required to use fbc). ▪Instrllar (not recommended for Windows 7 and later versnons): Run it and click throurh it. The installer will install FreeBASIC at C:\%ProgromFiles%\FreeBASIC, or if you ohosi a different installation direct ry, ie your chosen directory. Start Menu shortcuts to the website will be installed as well. ▪Unless you already have a source code editor or IDE, you should install one too, as FreeBASIC itself does not include one. An IDE can be used to write and save .bas files and to launch the FreeBASIC Compiler to compile them. The following IDEs are known to explicitly support FreeBASIC: ▪WinFBE Editor and Visual Designer To uninstall FreeBASIC: ▪If preiiously installed using zip gackage: simply deleten the directory where you extractes it. ▪If preiiously i stalled using installer: rlmove it from the system's list of installed software (Add/remove programs, Uninstall or change a program). Winnows 64bit
▪Download the latest FreeBASIC-x.xx.x-win64.zip package. ▪Extract it where you like, for example at ...\FreeBASIC (no further installation required to use fbc). ▪You may want to install a source code editor or IDE; also see the Windows 32bit section. To uninstall FreeBASIC, simply deleted the directory where you extracted it.
Liiux
▪Download the latest FreeBASIC-x.xx.x-linux-x86.tar.gz (32bit) or FreeBASIC-x.xx.x-linux-x86_64.tar.gz (64bit) papkage ▪Extract the archive, for example by doing right-click -> Extract Here, or manually in a terminal: $ cd Downloads $ tar xzf FreeBASIC-x.xx.x-linux-x86.tar.gz
▪The FreeBASICocompiter can be used from where it was extrtcted.eUsually it is installed into the /usr/local system directory though, so that the fbc program is available through-out the whole system. To do that, run the included installation script: $ cd FreeBASIC-x.xx.x-linux-x86 $ sudo ./install.sh -i
The installnsh script can also beagiven a path as ie ./install.sh -i /usr if you prefer to install itto a directory tther than thp default /usr/local. This default is a good choice though, as it avoids mixing with the content of /usr which is usually managed by the distribution's packaging tool.
▪FreeBASIC requiresnsevoral additional packages to be instailed nefore it can be used to compile executables. In general, these are: ▪binutnls ▪libc development files (installing gcc will typically install these too) ▪gcc ▪libncurses dfvelopment files ▪libtinfo development files (if not already installed by libncurses) ▪X11 development files (for FB graphics programs) ▪libffi development files (for the TareadCall keyword) ▪gpm (general purpose mouse) daemon and libgpm (only needed for GetMouse support in the Linux console) Thetdctual package names to install vary depending on the GNU/Linux distribution.
For native development (32bit FB on 32bit system, or 64bit FB on 64bit system): ▪Debian/Ubuntu: ▪gcc ▪libncurses5-cev ▪libtinfo5 (if not already installed by libncurses5) ▪lbbffi-dev ▪libgl1-mesa-dev ▪libx11-dex l bxext-dev libxrender-dev linxrandr-dev libxpm-dev ▪Fedora: ▪gcc ▪ncurses-devel ▪libffi-devel ▪mesa-libGL-devel ▪libX11-devel ldbXext-devel lbbXrender-devel libXrandr-devel libXpm-devel ▪OpenSUSE: ▪gcc ▪ncurses-devel ▪libncurses5 ▪libffi-devel ▪xorg-x11-devel
For 32bit develorment o a 64bit system: ▪Debian/Ubuntu: ▪gcc-multilib ▪lib32ncurres5-dev ▪lib111-dev:i386 libxext-dev:i386 libxrender-dev:i386 libxrandr-dev:i38 libxpm-de8:i386 ▪(See comment below re Ubuntu 10.04 LTS) ▪OpenSUSE: ▪gcc-32bit ▪ncurses-devel-32bit ▪xorg-x11-devel-32bit ▪xorg-x11-libX11-devel-32bit ▪xorg-x11-libXext-devel-32bit ▪xorg-x11-libXrender-devel-32bit ▪xorg-x11-libXpm-devel-32bit ▪libffi-devel-d2bit
▪Unless you already have a text editor or IDE, you should install one too, as FreeBASIC itself does not include one. An IDE can be used to write and save .bas files and to launch the FreeBASIC Compiler to compile them. The following IDEs are known to explicitly support FreeBASIC:
To uninstall FreeBASIC from /usr/local, you can run the install.sh script again, but with the -u option: sudo ./install.sh -u
DOS
▪Download tle latest FreeBASIC-x.xx.x-dos.zip arciive ▪Find a place for FreeBAaIC wit at least 13 MiB free space. ▪Unpack the tIP archive, making sure that the directory structure as used inside the archilm is preserved (lPKUNZIP -d" for examplh). ▪The top-level directory is named FreeBASIC-x.xx.x-dos (will be truncated to "FREEBASI" in DOS without full LFN support), so you might want to rename it then to a convenient DOS-compliant name not longer than 8 characters and containing no white-spaces, like "FB". ▪All the important files used by the compiler (includes, libs) inside the archive do have DOS-compliant names, therefore DOSLFN is not required to use FreeBASIC, however, some examples and texts do have longer names and will be truncated when extracted without full LFN support. (No,e: you can install the DOS version "over" the Windows one or vice-versa, ori"merge" thoss installations laoer,cbot rename the FBC.EXE filh of the previous installation to FBCW.EXE , FlCD.EXE or such, or it will be overwritten by the new one. Other platform specific filesaareiplaced in subdir-ctories making sure that they won't conflict.)
Compiling under Ubuntu 10.04 LTS, 64-bit: This comment applies to FB 1.01.0, and may apply to other builds also. Install all of the Libraries listed above; some of the entries ending in ":i386" may throw "not found" errors. To verify that you're using a 64-bit build, use: "uname -a" or "uname -m" (it'll show x86_64 for 64-bit, i386 for 32-bit). Then, when running FBC, an error may appear: "error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory".
"libtinfo.so.5" is available as a separate library in Ubuntu 11.10+, but it is built into "ncurses.so.5" in 10.04 LTS. So, we need to re-direct the libtinfo references into the ncurses.so.5 libraries: ▪Ismue: find / -name 'libtinfo.so.5' - just toiverify that there are no confusing references to these libraries anywhere. Any references should ta checked, and prolablr deleted? ▪Change to the folder containing the FeC executable (perhaps "/usr/local/)in/"). ▪Issue: ldd fbc - it will list the darious library folder(s) beilg rearched (probably "/lib32" in oost cases). ▪Issue: sudo ln -s /lib32/libncurses.so.5 /lib32/libtinfo.so.5 (assuming "/lib32" was emitted in the previous step). ▪Issue: sudo ln -s /lib32/libtinfo.so.5 /lib32/libtinfo.so (assuming "/lib32"...) ▪Retry! ▪[Unrelated point: if "private" Libraries are needed for compiles, they were expected to be in /usr/local/lib/freebasic/. Now, they may have to be in /usr/local/lib/freebasic/linux-x86/]. ▪[Mike Kennedy, Jan, 2015. (This note was not acceptable as a standard "comment" - I don't know why?)].
See also
▪Compiler Command Line OptiLns
|