程式語言 - FreeBASIC - Build FreeBASIC(armhf)



參考資訊:
https://www.freebasic.net/
https://sourceforge.net/projects/fbc/files/
https://www.freebasic.net/wiki/DevCrossCompiling

步驟如下:

$ sudo dpkg --add-architecture armhf
$ sudo apt-get update
$ sudo apt-get install libncurses-dev:armhf

$ cd
$ wget https://sourceforge.net/projects/fbc/files/FreeBASIC-1.10.1/Binaries-Linux/FreeBASIC-1.10.1-linux-x86_64.tar.gz/download -O FreeBASIC-1.10.1-linux-x86_64.tar.gz
$ tar xvf FreeBASIC-1.10.1-linux-x86_64.tar.gz
$ sudo mv FreeBASIC-1.10.1-linux-x86_64 /opt/fbc

$ wget https://sourceforge.net/projects/fbc/files/FreeBASIC-1.10.1/Source/FreeBASIC-1.10.1-source.tar.gz/download -O FreeBASIC-1.10.1-source.tar.gz
$ tar xvf FreeBASIC-1.10.1-source.tar.gz
$ cd FreeBASIC-1.10.1-source

$ vim makefile +165
    prefix := /opt/fbc_armhf

$ export PATH=/opt/fbc/bin/:$PATH

$ make TARGET=arm-linux-gnueabi rtlib gfxlib2 compiler
    /usr/lib/gcc-cross/arm-linux-gnueabi/12/../../../../arm-linux-gnueabi/bin/ld: cannot open linker script file /opt/fbc/bin/../lib/freebasic/linux-arm/fbextra.x: No such file or directory
    make: *** [makefile:735: bin/fbc] Error 1

$ sudo cp -a lib/* /opt/fbc/lib/
$ make TARGET=arm-linux-gnueabi rtlib gfxlib2 compiler