manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

27.1.2 Compiling multi-modules applications

In order to compile and link multi-modules applications, it is required to specify the association between Scheme source modules and Java qualified type names. This task is generally complex because of the annoying mapping that exists from Java class names and the operating file system names. In order to get rid of this problem, the Bigloo standard distribution contains a tool, jfile, that automatically produces Bigloo Module/Java classes association files. The default name for such a table is .jfile. When compiling a module, Bigloo checks if a .jfile exists in the current directory, if it exists, the file is read. The compilation option -jfile may be used to specify an alternative jfile name. Example:

$ cat > foo.scm
(module foo (export (foo))) (define (foo) ’foo)
$ cat > bar.scm
(module bar (export (bar))) (define (bar) ’bar)
$ cat > hux.scm
(module hux (export (hux))) (define (hux) ’hux)
$ cat > main.scm
(module main (main main) (import foo bar hux)
(define (main argv)
   (print (foo))
   (print (bar))
   (print (fhux)))
$ afile *.scm > .afile
$ jfile *.scm > .jfile
$ bigloo -jvm -c foo.scm
$ bigloo -jvm -c bar.scm
$ bigloo -jvm -c hux.scm
$ bigloo -jvm main.scm foo.class bar.class hux.class

For an explanation about the .afile, see section Modules.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 23, 2011 using texi2html 5.0.