|
From: | Josh Barrett |
Subject: | Re: [Chicken-users] Compiling multiple modules into a single executable |
Date: | Sun, 16 Oct 2016 20:52:26 +0000 |
Of course I can. Hopefully, it will help:
---
$ cat foo.scm
(declare (unit foo))
(module foo (quux)
(import chicken scheme)
(define (quux)
(display "quux")))
$ cat bar.scm
(declare (unit bar))
(declare (uses foo))
(module bar (baz)
(import chicken scheme)
(import foo)
(define (baz)
(quux)
(display "baz\n")))
$ 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?
* Josh Barrett <address@hidden> [161016 21:57]:
> I really like modules. I tend to use several per project, if not one per
> file. However, when it comes time to compile an executable, I'd rather not
> have 50 random .so files cluttering up the place. I've tried using
> compilation units (which seems to be the endorsed method of compiling
> multiple files together), but I can't get them to work with modules.
Those two concepts don't contradict each other, you can use both.
Can you show us a simple example of your use case that does not work?
Kind regards,
Christian
--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.
[Prev in Thread] | Current Thread | [Next in Thread] |