FreeBasic in GCC?
FreeBasic in GCC?
Will FreeBasic ever be included in GCC along FreePascal which is already there?
Re: FreeBasic in GCC?
FreePASCAL is not included in GCC.Nxx wrote:Will FreeBasic ever be included in GCC along FreePascal which is already there?
The FreeBASIC compiler uses the GCC toolchain (assembler, linker) to aid in compiling a FreeBASIC program.
To be included in GCC there would have to be a FreeBASIC frontend to GCC. This frontend would be a FreeBASIC parser that translates FreeBASIC sourcecode into 'something' the GCC backend can understand (some sort of abstract syntax tree). No one has written such a frontend yet and afaik no one is writing one.
There are plans to build a FreeBASIC-to-C translator. That way GCC could be used without the need to write a FreeBASIC frontend to GCC.
Some work has been done on this translator and more work needs to be done on it (it's not ready to be 'officially' released yet).
-
- Posts: 775
- Joined: Jul 01, 2005 18:45
-
- Posts: 255
- Joined: Jan 05, 2006 0:56
-
- Posts: 44
- Joined: Jun 16, 2008 1:42
-
- Posts: 453
- Joined: Dec 24, 2005 2:32
- Location: WA - USA
- Contact:
Wouldn't this make FreeBASIC a translator like BCX rather then a Basic compiler? I thought Victor was clear that the design of FreeBASIC was to create a Basic compiler that would be expanded using it's own core language syntax.Trenton_net wrote:FBC --> GCC would totally be neat. Something that could forever push it over the edge to being something really portable.
If you need a C intermediate step, use BCX. They are both GPL open source projects so there shouldn't be a competitive attitude about using either.
Maybe I'm missing the point/reason for changing FreeBASIC's direction and all the hard work getting the project this far. I'm seeing slow progress just getting to 1.0. A total rewrite to create another Basic to C translator seems like blue sky thinking to me. IMHO
Actually, the C emitter is not the default. It is an option. The purpose for which is that you could compiler with FB for WIN, LIN, DOS, but if you needed Mac, or something similar, you can emit C code and compile for that hardware. It is not supposed to be used all the time.
Plus, right now it only sort of works...
Plus, right now it only sort of works...
-
- Posts: 453
- Joined: Dec 24, 2005 2:32
- Location: WA - USA
- Contact:
FreeBASIC for Windows seems to be the most mature and feature rich version being offered. If I needed to run my FreeBASIC application on Linux or the Mac, I would use CrossOver/Wine. It works great and runs at native platform speeds with all the benefits of the winapi in your toolbox. (including COM support)
It would be great if Matthew (counting_pine) would post what the goals for 1.0 are and finish the project that was started before doing a 180 at the 11th hour.
It would be great if Matthew (counting_pine) would post what the goals for 1.0 are and finish the project that was started before doing a 180 at the 11th hour.