FreeBASIC on linux
Solution 1
You can use QB64 as an IDE if you want to use QBASIC. (Yes, it does work on 32 bit platforms.)
In case you want to stick with FreeBASIC, you will need to install a few dependencies. Also, it's only a compiler, so you will need to create scripts using a text editor of your choice, then compile and execute them from a terminal, like so:
$ fbc -lang qb example.bas
$ ./example
Installing depndencies
Source: http://www.freebasic.net/wiki/wikka.php?wakka=CompilerInstalling
32 bit
$ sudo apt-get install gcc g++ libncurses5-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev libffi-dev
64 bit
$ sudo apt-get install gcc-multilib g++-multilib lib32ncurses5-dev libx11-dev:i386 libxext-dev:i386 libxrender-dev:i386 libxrandr-dev:i386 libxpm-dev:i386
Installing FreeBASIC
$ wget 'http://sourceforge.net/projects/fbc/files/Binaries%20-%20Linux/FreeBASIC-0.90.1-linux.tar.gz/download?download=#' -O FreeBASIC-0.90.1-linux.tar.gz
$ tar -xf FreeBASIC-0.90.1-linux.tar.gz
$ cd FreeBASIC-0.90.1-linux
$ sudo ./install.sh
Solution 2
What you are looking for is a BASIC interpreter. You can code BASIC on any text editor. According to this post, the procedure you should follow is:
- Get Qbasic.exe from microsoft
- Install dosemu: sudo apt-get install dosemu
- Right click on Qbasic.exe and "open with dosemu"
The real question, of course, is why in the world would you want to code BASIC? Even if you do have a valid reason for this, why in the world would you want to code BASIC in a Linux environment? There are many interpreted languages that are already integrated or for which it is very easy to install interpreters in the *ix world. The list includes, but is not limited to, Perl, Python, BASH, TCSH, Ruby, Lisp...
Related videos on Youtube
a-z
Updated on September 18, 2022Comments
-
a-z over 1 year
I want to install freeBASIC on ubuntu( to code QBASIC). There is a package "libfreebasic" which I've installed but I don't see any difference on my system... Can I code in QBASIC in ubuntu?
-
Kishan Vaishnani over 10 yearsWell, I definitely would not recommend bash, tcsh, or perl as first programming languages.
-
terdon over 10 years@Peon that's your prerogative but I just listed some of the more famous scripting languages that are natively available on *nix. Anyway, my first language was Perl but who said anything about first languages?
-
Robert about 7 yearsI learnt qbasic when I was a child, 25 years ago. I want to program with it again today and I only have Linux. That Is my reason
-
terdon about 7 years@Robert in that case, I would strongly urge you to learn another. While you can use basic in Linux, it will be needlessly hard and it isn't a very useful language anyway. Having learned one, learning a second is not too hard, so you really should consider something like python. Your choice, of course, but it really isn't a very relevant language these days.