Oxygen Basic
Information => Introducing Oxygen => Topic started by: Charles Pegge on October 01, 2010, 04:46:39 AM
-
HOW TO COMPILE:
Oxygen currently compiles with FreeBasic 0.20b (for MS Windows)
The source code and compiling batch file are included in the source folder.
This compels the GNU linker to use DllMain as the entry point
fbc thinBasic_Oxygen.bas -dll -Wl -e,_DllMain
(previous method)
fbc -dylib thinBasic_Oxygen.bas
-
Charles..
I never try compile oxygen before from source and I want to try.
Which version of FB you use for latest Oxygen?
-
Hi Aurel,
I'm using FreeBasic 0.24.
0.21 and above should work
-
Charles...
I was really thinking about creating my fork of Oxygen.
So i need FreeBasic from 0.21 to 0.24 v.
Is there anything specific what i maybe miss ?
-
Should be fine. I have not tried anything more recent than 0.24 yet.
Compiling:
fbc -dll Oxygen.bas
-
Thanks... ;)
-
I think you should consider using latest FreeBASIC with c emitter, would give faster build then normal FreeBASIC compilation.
-
Yes. I agree. Aurel would fit in great with those guys.
-
I'll see how the new C-emitting FB works with Oxygen. It should aid building on different platforms, subject to rewriting inline-assembler sections.
PS:
No problems encountered when compiling Oxygen with FreeBasic version 0.91 in the default (GAS) mode
-
My only fear is that it may be too nasty to look at in that form.
-
No, the emitted C code is not for humans, but probably no worse than the GAS emissions :)
-
It's easy to forget that O2 is a compiler not a translator.
Have you looked at Daniel's uCalc Transformer as a possible way for O2 users to port their code to C?
-
I'm not interested for c emiter and i will use 0.24.
By the way i see this ucalc transformer and idea is not bad BUT
what you can translate,if you translate PB code to C which contain win api function
your C code will only work on windows,right?
-
The uCalc Transformer can translate anything to anything else. Daniel's project is to try and give the PB folks a migration path and still allow them to feel at home using PB syntax. Patrice has also provided a library of C++ functions emulating PowerBASIC syntax.
-
John, AllBasic site was what came up when I searched for uCalc Transformer. Looks interesting.
Here is a thought, can't we output existing oxygen to c++ and then use c++ to develop oxygen for the future?
-
From FB, I think it will have to be manually coded ,as Patrice did with his PB-based libraries. An automated translation would cause too many cryptic bugs.
The trivial stuff like curly braces and semicolons could be automated quite easily though.
-
I think the smart way is to use Daniel's tool to convert BaCon to C. You have a working model to use as a guide. That could then be the gold standard for a traditional BASIC to ANSI/C tranlator. Variations could be derived from that. The biggest obstacle I see is a efficient memory/string manager. Is multi-threading a feature that should be considered for a BASIC to C translator?
Trying to convert the O2 compiler to C++ is unrealistic IMHO.