Compilation is driven by namespace load-order, so just ensure that you add a (:require com.foo.IFoo) to the ns declaration where you define the Foo class.

I seem to remember suggesting that Clojure should implicitly attempt to require namespaces corresponding to classnames being implemented or extended in the interop forms, but that didn't get very far...

- Chas

On Apr 2, 2010, at 1:22 AM, Nick Dimiduk wrote:

Heya!

I'm implementing a simple class hierarchy in clojure to be exposed to
external java code using AOT compilation. The library requires I
declare an interface extending a base-interface from the library and
then provide an implementation class. For example:

interface IFoo extends ILibInterface {...}

class Foo implements IFoo {...}

I have everything implemented in clojure using gen-interface and gen-
class and it's rather nice - at the repl. The problem is at compile
time - how can I order the compilation such that IFoo is found by Foo?
Is there some trick to my usage of :namespaces in the leiningen project
declaration?

Thanks!
-Nick

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to