This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Struggling with compiling a module as classes and using (load) on it


Hello again,

I have a file:

testpackage/testmodule.scm:

(define (testfunction)
  (display "Hello from testfunction"))

testrunner.scm:

(load "testpackage.testmodule")
(testfunction)

And I'm trying to compile it as a module and load it, however, the
loader is never finding it :(

$ kawa -P testpackage. -C testpackage/testmodule.scm && CLASSPATH=.
kawa testrunner.scm
(compiling testpackage/testmodule.scm to testpackage.testmodule)
testrunner.scm:2:1: warning - no declaration seen for testfunction
java.lang.RuntimeException: cannot load testpackage.testmodule (No
such file or directory)
	at kawa.standard.load.apply2(load.java:47)
	at kawa.standard.load.apply1(load.java:26)
	at gnu.mapping.Procedure.apply(Procedure.java:130)
	at gnu.mapping.Procedure.apply(Procedure.java:113)
	at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
	at testrunner.run(testrunner.scm:2)
	at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:279)
	at gnu.expr.CompiledModule.evalModule(CompiledModule.java:41)
	at gnu.expr.CompiledModule.evalModule(CompiledModule.java:60)
	at kawa.Shell.runFile(Shell.java:507)
	at kawa.Shell.runFileOrClass(Shell.java:426)
	at kawa.repl.main(repl.java:873)

I have based my example on the information here
http://www.gnu.org/software/kawa/Compiling.html#Files-compilation

Does anyone know what's going wrong?

Thanks in advance,
Bill :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]