Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The L-BASIC compiler
#14
The "bad expr type 18" error is because it doesn't know how to build code for the INPUT statement. I wasn't kidding when I said it has very poor support for most commands. It also doesn't know how to compile arrays, or LOCATE (though arrays and user defined TYPEs are probably next on the list).

The error about clang not found is a genuine bug though, looks like it doesn't handle being on the %PATH% very well. You might be able to work around that by setting the LLVM_ROOT environment variable to point to the llvm directory.

Thanks for trying it out, and sorry it's so limited for now. So many commands...

P.S The gcc/clang/mingw situation is complicated, but basically mingw is a set of libraries that is combined with either gcc or clang to build a windows compiler and toolchain. For lbasic you could probably replace clang-mingw with gcc-mingw and it'd be okay, but the more vital file is the libLLVM-14.dll which contains all the logic for generating machine code that lbasic calls directly. Unlike QB64, lbasic isn't generating C code and compiling it. It emits actual machine code object files, then calls clang to link it with the runtime library. I could call the linker (ld) directly but clang adds all the correct flags to make life easier. To compare it with QuickBasic, running BC.EXE is the equivalent of doing "lbasic -e obj". Without -e obj, lbasic will do the equivalent of also running LINK.EXE and linking against BCOM45.LIB.
Reply


Messages In This Thread
The L-BASIC compiler - by luke - 01-06-2023, 01:16 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-06-2023, 08:06 PM
RE: The L-BASIC compiler - by cage - 01-06-2023, 10:24 PM
RE: The L-BASIC compiler - by SpriggsySpriggs - 01-10-2023, 02:39 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-06-2023, 10:59 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-08-2023, 08:22 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 09:40 PM
RE: The L-BASIC compiler - by PhilOfPerth - 01-06-2023, 11:01 PM
RE: The L-BASIC compiler - by SMcNeill - 01-07-2023, 12:05 AM
RE: The L-BASIC compiler - by luke - 01-07-2023, 02:27 AM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 04:01 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-07-2023, 11:57 PM
RE: The L-BASIC compiler - by Jack - 01-07-2023, 01:39 PM
RE: The L-BASIC compiler - by bplus - 01-07-2023, 02:40 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 06:56 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 08:15 PM
RE: The L-BASIC compiler - by luke - 01-08-2023, 05:08 AM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 05:24 PM
RE: The L-BASIC compiler - by luke - 01-08-2023, 09:55 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 11:21 PM
RE: The L-BASIC compiler - by a740g - 01-10-2023, 01:13 PM
RE: The L-BASIC compiler - by Jack - 05-20-2024, 01:12 PM
RE: The L-BASIC compiler - by luke - 05-21-2024, 12:14 PM
RE: The L-BASIC compiler - by Jack - 05-21-2024, 12:31 PM
RE: The L-BASIC compiler - by Jack - 05-21-2024, 02:27 PM
RE: The L-BASIC compiler - by Jack - 05-21-2024, 04:24 PM
RE: The L-BASIC compiler - by luke - 05-22-2024, 10:51 AM



Users browsing this thread: 2 Guest(s)