This is a continuation of my previous question . Unfortunately, it seems that Chicken Scheme does not support complex numbers by default, but offers the numbers egg, which can be set.
I installed this egg through chicken-install numbers , and I can download it in an interpreted environment. I can do this by calling use ; either manually in REPL, or by running my .scm file as a script via csi .
For example, this script works fine:
(use numbers) (begin (display 3+3i) (newline) )
when starting with:
csi -s main.scm
But when I compile this exact fragment with csc (even without any additional flags), I get the same runtime error as I would if I hadn’t downloaded it (for example, an unbound variable). In a compiled environment, use doesn't seem to cut mustard.
Two other things to note are that in the documentation I tried other import functions like require-extension , require-library , etc., but none of them matter. The other is that if I change the module name to something other than numbers , say numberss , it will not be able to compile, complaining that it cannot load the extension, so obviously, at least it detects that numbers .
Can someone explain, preferably with a short working example, how to use an egg in a compiled environment? Thank you in advance!:)
source share