Errors you will often run into, what they mean, why they appear, and possible solutions.
You are probably writing a match expression and forgot the separator between the matchee and body expressions.
The following code would emit this error.
match foo { ... };
Instead, add a separator between the matchee and body expressions.
match foo, { ... };
;; ^
;; THIS FIXES IT
For context: a match expression is a special kind of block expression which accepts “named” expressions beginning with .identifier syntax.
undefined reference to `_XGlint__init_<name> where <name> is a name of a module the program has imported. The issue here is simple: if you made it this far, the Glint compiler was able to find the module, but the linker isn’t actually finding the module definition.
Likely solution includes linking with the object file built from the imported module. Often, this error appears because you have built the module (and therefore Glint is able to find the metadata for the imported module, and doesn’t complain about the module not being found), but, you haven’t fed the built module in with the executable build.
lcc ./mod.g lcc ./exe.g gcc ./exe.s !ERROR EMITTED HERE!
Instead:
lcc ./mod.g gcc -c ./mod.s !THE FIX! lcc ./exe.g gcc ./mod.o ./exe.s !AND HERE!