On 2016-10-16 22:52, Josh Barrett wrote:
> [...]
> $ csc -c foo.scm bar.scm
> 
> Syntax error (import): cannot import from undefined module
> ---
> As I understand it, this should work, but it obviously doesn't. Does
> anybody know why?
> [...]

Hello,

this cannot work because the compiler cannot find the necessary import
libraries.

Try compiling the two files separately and emitting import libraries
like this:

$ csc -c foo.scm -J
$ csc -c bar.scm -J

You can then link to a main program in a separate step, like this:

$ cat main.scm
(declare (uses bar))
(import bar)
(baz)

$ csc foo.o bar.o main.scm -o foobar

$ ./foobar
quuxbaz

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to