What is FreeBasic written in?

General FreeBASIC programming questions.
Posts: 2344
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL

Re: What is FreeBasic written in?

Postby marcov » Aug 22, 2017 20:53

PaulSquires wrote: V1ctor chose to use VBDOS at the time but I'm sure he could have used any other language that was comfortable to work with with C or C++ being obvious choices.

I think a Basic like might have been chosen deliberately to at least have a chance on self-hosting.

FB still relies on the GCC toolchain (or LLVM) to create the resulting executable code, exe, dll, etc.

No it does not. It has a plain C option, but the asm backend can work with just binutils which are outside the core gcc suite.

A suitable compiler is needed for the libraries though, but not for the FB generated code.

Essentially, FB parses your source code and outputs intermediate code (I guess essentially a translator) using assembly language or C language depending on option chosen and using either 32 or 64 bit structures. That intermediate code is then fed to GCC which creates the end result by linking the needed FB runtime functions and any necessary supporting operating system and user defined libraries code.

At least that's my understanding of how it all ties together.

Somewhat but the linker is not dependent on gcc, so if you have precompiled libraries,and are using the assembler baclned, the compiler should be able to link with just binutils (which is just a few binaries (g)as/ar/ld and lesser used objdump/strip/nm etc), and not full fledged GCC.

Return to “General”

Who is online

Users browsing this forum: BristolBrick and 3 guests