我刚开始学习Clojure Web开发,但我卡在一个非常简单的问题上。在 project.clj
中有 :main myapp.core/foo
(defproject myapp "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]]
;; this will set foo as the main function
:main myapp.core/foo)
但是当我运行lein
时,会出现以下错误:
C:\Users\a>lein run First
No :main namespace specified in project.clj.
C:\Users\a>
我做错了什么?
project.clj
在C:\Users\a\myapp
中,所以我使用cd
命令进入了该目录。感谢您的回答。 - Zeynel