Ok thanks all
found this here
https://github.com/Galleondragon/qb64/pull/16****
I think this overview will provide you with enough insight to get a general idea, though I'm still new to the codebase myself and this is based solely on my own exploration:
internal/c/qbx.cpp: The C++ source file compiled and linked to create a binary.
internal/c/libqb.cpp: The C++ source file compiled and linked to create libqb_XXXXXX.o. When using the setup script, XXXXXX is "setup". When using the QB64 compiler, it's a string based on the version of QB64 and a set of dependencies that should be loaded to make the program work, such as sockets, fonts, etc. For OS X, libqb.mm is used instead, which simply includes libqb.cpp.
internal/source: Contains all files that would be in internal/temp if compiling source/qb64.bas using an existing qb64 binary.
internal/temp: A work directory containing all files that get included in internal/c/qbx.cpp to make your program work.
source: Contains the QB64 source code for the qb64 compiler binary, qb64.bas being the "main" file.
****
Ok it looks like there must be a translation from Quick Basic source to C++ source
In the above quote, "C++ source" is mentioned twice but we are writing BAS files so where is the translator?
Is it easier to write a Quick Basic source to c++ source translator or a custom C++ complier?