FreeBASIC für Linux

6711
a-z

Ich möchte freeBASIC auf Ubuntu installieren (um QBASIC zu codieren). Es gibt ein Paket "libfreebasic", das ich installiert habe, aber ich sehe auf meinem System keinen Unterschied ... Kann ich in Ubuntu in QBASIC codieren?

1

3 Antworten auf die Frage

1
terdon

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:

  1. Get Qbasic.exe from microsoft
  2. Install dosemu: sudo apt-get install dosemu
  3. 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...

Nun, ich würde definitiv nicht als erste Programmiersprache bash, tcsh oder perl empfehlen. Peon vor 10 Jahren 0
@Peon ist Ihr Vorrecht, aber ich habe nur einige der bekannteren Skriptsprachen aufgelistet, die nativ auf * nix verfügbar sind. Wie auch immer, meine erste Sprache war Perl, aber wer hat etwas über die ersten Sprachen gesagt? terdon vor 10 Jahren 0
Qbasic habe ich vor 25 Jahren als Kind gelernt. Ich möchte heute wieder damit programmieren und habe nur Linux. Das ist mein grund Robert vor 7 Jahren 0
@Robert In diesem Fall möchte ich Sie dringend dazu auffordern, einen anderen zu lernen. Während Sie Basic in Linux verwenden können, ist es unnötig schwer und es ist sowieso keine sehr nützliche Sprache. Eine Sekunde gelernt zu haben, ist nicht zu schwer, also sollte man wirklich etwas wie Python in Betracht ziehen. Ihre Wahl natürlich, aber heutzutage ist es keine wirklich relevante Sprache. terdon vor 7 Jahren 0
1
nyuszika7h

Sie können QB64 als IDE verwenden, wenn Sie QBASIC verwenden möchten. (Ja, es funktioniert auf 32-Bit-Plattformen.)

Wenn Sie bei FreeBASIC bleiben möchten, müssen Sie einige Abhängigkeiten installieren. Außerdem handelt es sich nur um einen Compiler. Sie müssen also Skripts mit einem Texteditor Ihrer Wahl erstellen und sie dann wie von einem Terminal aus kompilieren und ausführen:

$ fbc -lang qb example.bas $ ./example 

Abhängigkeiten installieren

Quelle: 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 

FreeBASIC installieren

$ 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 
0
Dan Jones

If you're looking for a full IDE specifically for QBasic, I don't think you'll find one. FreeBASIC is a compiler, which claims to be compatible with QBasic, but you don't use it for actually writing applications. You can write your BASIC applications in whatever text editor or IDE you'd like (I recommend Emacs, others may recommend Vim, Eclipse, or something else). Once you've written the application in the editor of your choice, you can use FreeBASIC to compile it on your machine.

However, you really might want to consider options other than QBasic. If you're set on using some form of Basic, you can use VB.Net, and compile it using the Mono VB.Net compiler. You could also try Gambas, RealBASIC, KBasic, etc.