04-09-2024, 10:47 PM
QB64 is a multi-language software. What QB64 and QB64PE both do, is they take BAS-code, then translate it to C-code, where a c-compiler then compiles it to a working executable.
For almost all of the BAS handling, we tend to use QB64.bas which you can find in the /source folder. This is the code which makes our IDE and which we use to enter our program with. It does the syntax checking, formatting, and all such things for us. It all does the translation process for us, which processes those BAS commands that you enter, and turns them into C-commands.
libqb.cpp and all the rest of QB64 contains the c-code which holds the libraries, routines, and such that actually compiles. They're located inside the internal/c folder, and the gcc compiler can be found one subfolder deeper than them, in the internal/c/compiler folder.
So the workflow is basically:
source/qb64pe.exe <-- enter your program here. It translates it to C-code.
internal/c/qbx.cpp <-- this is the actual entry point where the C-code exists (what you write is basically #INCLUDEd in it), which we compile when you hit F5 in the IDE.
internal/c/compiler <-- and here is where the compiler/linker, and all exists which compiles that completed C-code into the executable for you.
For almost all of the BAS handling, we tend to use QB64.bas which you can find in the /source folder. This is the code which makes our IDE and which we use to enter our program with. It does the syntax checking, formatting, and all such things for us. It all does the translation process for us, which processes those BAS commands that you enter, and turns them into C-commands.
libqb.cpp and all the rest of QB64 contains the c-code which holds the libraries, routines, and such that actually compiles. They're located inside the internal/c folder, and the gcc compiler can be found one subfolder deeper than them, in the internal/c/compiler folder.
So the workflow is basically:
source/qb64pe.exe <-- enter your program here. It translates it to C-code.
internal/c/qbx.cpp <-- this is the actual entry point where the C-code exists (what you write is basically #INCLUDEd in it), which we compile when you hit F5 in the IDE.
internal/c/compiler <-- and here is where the compiler/linker, and all exists which compiles that completed C-code into the executable for you.