Hi Josh,
I think the following is what you're after.
$ cat foo.scm
(module foo * (import scheme) (define (foo) 1))
$ cat bar.scm
(import foo)
(print (foo))
$ csc -c -unit foo -emit-import-library foo foo.scm
$ csc -uses
The `compiling` feature specifier is only expanded when compiling, so
something like `(cond-expand (compiling (import foo)) (else (use foo)))`
ought to work.
To be totally honest, in this specific situation you can actually get away
with using just `(use foo)` since the "-uses foo" flag tells csc
Is there any way to use (cond-expand) to decide whether to (use) or
(import) depending on if the program's compiled or not?
On Sat, Dec 19, 2015, 20:57 Evan Hanson wrote:
> Hi Josh,
>
> I think the following is what you're after.
>
> $ cat foo.scm
> (module foo *
So I have file foo.scm, which contains module foo, and file bar.scm which
calls (use foo). My question is, how do I compile these both down to a
single executable, as opposed to having executable bar, which uses foo.so?
I've tried several approaches but I always get errors at compilation, as
both