On Fri, Nov 23, 2012 at 12:27:29PM -0800, Miguel Fernandez wrote: > Hey everyone,
Hello Miguel! > I'm just starting out in Scheme, and trying to compile a small snippet that > uses complex numbers. The code is as follows: > > (use numbers) > > (begin > (display 3+3i) > (newline) > ) > > I installed the `numbers` egg with `chicken-install`, load it with `use`, and > when I run it (as a script) through the interpreter `csi` it works perfectly. > Unfortunately, when I try to compile it with: > > csc -uses numbers main.scm Hm, I think "uses" is for old-style "units". Normally you'd just compile the program and it should work. Because numbers has special syntax that extends the basic reader you'll need to use "csc -X numbers-syntax main.scm" See also the docs: http://wiki.call-cc.org/eggref/4/numbers#compiled-code > I get the following error: > > main.o: In function `C_toplevel': > main.c:(.text+0x1c2): undefined reference to `C_numbers_toplevel' > collect2: ld returned 1 exit status I'm not sure why that happens. I guess it's caused by the "uses" switch which assumes you're statically linking? Hope this helps, Peter -- http://sjamaan.ath.cx -- "The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." -- Donald Knuth _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users