Downloading and running
You can download QB64 at the qb64.org website.
You install QB64 by simply unpacking the zip file to any drive/folder. Be sure that the directories are extracted as well.
In order to start QB64 you double click on it, and the IDE will show up or you can compile a BAS file directly using a command line or batch file using:
- QB64 -c filename.bas
QB64 started supporting QuickBASIC 4.5's binary format in build 20171001/72. Older versions can only open source files saved as plain text. For more information about QuickBASIC's binary format, check out this article.
The IDE is an editor that checks the code as you write it and you can also load an existing BAS file. The IDE will check that there are not any errors that it can detect.
Working in the IDE is pretty straight forward, you write the code and then you press F5 or navigate through the menu to Run - Start to compile and run the code. A .exe file (in Windows) or an executable binary (Linux/macOS) will be made in the QB64 folder named as "untitled.exe" or "untitled" if you haven't saved it to a different name yet.
Saving is easy also, you click File - Save As... just as in any ordinary program and choose the location and filename. If you run it the .exe will still be in the QB64 directory though, as the resulting executable is always created there (unless you check the option Run - Save EXE in the source folder).
The IDE is DOS-style but has windows functions such as copy and paste from the clipboard, etc.
So let's create our first program! Just type it in the IDE (or copy & paste):
Press F5 to run it and watch as it prints "My first QB64 program!" to the screen!
If you can't get QB64 to run, be sure to let us know at the forum at qb64.org (but first be sure to check that the problem hasn't been posted before).
The Community hopes that you will have fun programming in QB64!