2014-08-28 58 views
2

我正在嘗試向第一個leiningen項目添加第二個文件。Leiningen classpath問題,將第二個文件添加到項目中

在Pro/core.clj

(ns pro.core 
    (:gen-class) 
    (:require ([pro.protocols :as prtcl]))) 

(extend-protocol prtcl.Matrix 
... 

在Pro/protocols.clj

(ns pro.protocols) 
(defprotocol Matrix 
    "Protocol for working with 2d datastructures." 
    (lookup [matrix i j]) 
    (update [matrix i j value]) 
    (rows [matrix]) 
    (cols [matrix]) 
    (dims [matrix])) 

運行時編譯雷音我不斷收到:螺紋

異常 「主」 java.lang.ClassNotFoundException: prtcl.Matrix,編譯:(pro/core.clj:8)

謝謝!

回答

2

你想要prtcl/Matrix而不是prtcl.Matrix

+0

謝謝,但仍然沒有工作, 什麼我現在剛開是: 產生的原因: java.lang.RuntimeException:沒有這樣的命名空間:prtcl – Simbi 2014-08-28 17:50:59

0

除了迭戈的回答,我的帽子改寫

(:require ([pro.protocols :as prtcl])) 

(:require [pro.protocols :as prtcl])