1

I am trying to make a small window using Seesaw for Clojure. I have created a project "sample" using Leiningen.

lein new app sample

I have made added the dependency in the project file.

(defproject sample "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.6.0"] [seesaw "1.4.4"]]
  :main ^:skip-aot sample.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

My source file is as follows:

(ns sample.core
  (:gen-class)
  (:require [seesaw.core :as seesaw]
            [seesaw.dev :as dev]))

(def window (seesaw/frame
             :title "First Example"
             :content "hello world"))

(dev/show-options window)

But when I run it I keep getting an error: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such namespace: dev, compiling:(C:\Users\A\sample\src\sample\core.clj:10:1)

Laurel
  • 5,965
  • 14
  • 31
  • 57
abc
  • 153
  • 2
  • 12
  • How do you run it? I guess you already visited some tutorials as https://gist.github.com/daveray/1441520 – Jaime Agudo Nov 25 '14 at 13:04
  • Is there a reason you're AOT-compiling the code? I don't see anything there that would require AOT. Does it work without AOT? – Nathan Davis Nov 26 '14 at 15:44

1 Answers1

0

I followed your instructions and it worked fine for me, so long as I left the -main definition in place.

Timothy Pratley
  • 10,586
  • 3
  • 34
  • 63