On Monday, August 3, 2015 at 9:27:47 AM UTC-5, James Elliott wrote:
>
> Indeed, I visited the page you cite while trying to pin down this problem. 
> However, I am fairly certain that in my case it is a weird side effect, not 
> a root cause: I get that message when compiling my Clojure file if I try to 
> call a function which is defined later in the file. If I move the function 
> definition up before the point where I was calling it, everything compiles 
> fine, and no linkage error. No library 
>

Ah--if that's the problem, it sounds familiar.  Try doing 'lein clean' 
before 'lein compile' and see whether you get the same error.  That's 
assuming you have namespaces/classes listed after :aot in project.clj.  (If 
not, then I don't think that 'lein compile' is actually doing anything.)

You probably know this, but: When using Java classes, whether defined by 
gen-class or one of the other four ways to define classes (defrecord, 
deftype, proxy, reify), Clojure is very persnickety about compilation 
order.   A class has to be compiled before you can compile something that 
explicitly references it.  (No cyclic dependencies between explicit 
references to classes.)
 

> changes in between the two tests. And this only happens when my Clojure 
> file is subclassing a Java object. Very, very strange...
>
> On Monday, August 3, 2015 at 12:27:38 AM UTC-5, Mars0i wrote:
>>
>> I don't have anything helpful to say, but:  I've often gotten a useful 
>> stacktrace from compile-time errors using 'lein compile' with :gen-class.  
>> Not always.  Sometimes I have to use the guess-and-comment-out method.  So 
>> I think that whatever's happening is not just an issue with compilation of 
>> gen-class.  Maybe an issue involving libraries?  This page 
>> <http://examples.javacodegeeks.com/java-basics/exceptions/java-lang-unsatisfiedlinkerror-how-to-handle-unsatisfied-link-error/>
>>  
>> is consistent with that hypothesis.
>>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to