[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] How do you compile multiple modules into a single ex
From: |
Evan Hanson |
Subject: |
Re: [Chicken-users] How do you compile multiple modules into a single executable? |
Date: |
Sun, 20 Dec 2015 14:57:28 +1300 |
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 foo bar.scm foo.o
$ ./bar
1
Note that when compiling bar.scm with foo as a unit this way, (use foo)
becomes (import foo).
Cheers,
Evan