Open naturalbornchiller opened 3 years ago
Per this, you should be using quil "4.0.0-SNAPSHOT"
if you're using Java 11.
Got it. Now I've switched to Java 8 and am getting a different error.
{:clojure.main/message
"Syntax error compiling at (/private/var/folders/3j/m7d3v4b116768h50xt6m4stw0000gn/T/form-init3264948636380199103.clj:1:125).\nCannot find anything to run for: my-stuff.core\n",
:clojure.main/triage
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 1,
:clojure.error/column 125,
:clojure.error/source "form-init3264948636380199103.clj",
:clojure.error/path
"/private/var/folders/3j/m7d3v4b116768h50xt6m4stw0000gn/T/form-init3264948636380199103.clj",
:clojure.error/class java.lang.Exception,
:clojure.error/cause
"Cannot find anything to run for: my-stuff.core"},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message
"Syntax error compiling at (/private/var/folders/3j/m7d3v4b116768h50xt6m4stw0000gn/T/form-init3264948636380199103.clj:1:125).",
:data
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 1,
:clojure.error/column 125,
:clojure.error/source
"/private/var/folders/3j/m7d3v4b116768h50xt6m4stw0000gn/T/form-init3264948636380199103.clj"},
:at [clojure.lang.Compiler load "Compiler.java" 7648]}
{:type java.lang.Exception,
:message "Cannot find anything to run for: my-stuff.core",
:at
[user$eval140 invokeStatic "form-init3264948636380199103.clj" 1]}],
:trace
[[user$eval140 invokeStatic "form-init3264948636380199103.clj" 1]
[user$eval140 invoke "form-init3264948636380199103.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7177]
[clojure.lang.Compiler eval "Compiler.java" 7167]
[clojure.lang.Compiler load "Compiler.java" 7636]
[clojure.lang.Compiler loadFile "Compiler.java" 7574]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$init_opt invokeStatic "main.clj" 477]
[clojure.main$init_opt invoke "main.clj" 477]
[clojure.main$initialize invokeStatic "main.clj" 508]
[clojure.main$null_opt invokeStatic "main.clj" 542]
[clojure.main$null_opt invoke "main.clj" 539]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "Cannot find anything to run for: my-stuff.core",
:phase :compile-syntax-check}}
Is this because I don't have a -main
function in my-stuff.core
?
I haven't changed my-stuff.core
since scaffolding the project and it looks like this:
(ns my-stuff.core
(:require [quil.core :as q]
[quil.middleware :as m]))
(defn setup []
; Set frame rate to 30 frames per second.
(q/frame-rate 30)
; Set color mode to HSB (HSV) instead of default RGB.
(q/color-mode :hsb)
; setup function returns initial state. It contains
; circle color and position.
{:color 0
:angle 0})
(defn update-state [state]
; Update sketch state by changing circle color and position.
{:color (mod (+ (:color state) 0.7) 255)
:angle (+ (:angle state) 0.1)})
(defn draw-state [state]
; Clear the sketch by filling it with light-grey color.
(q/background 240)
; Set circle color.
(q/fill (:color state) 255 255)
; Calculate x and y coordinates of the circle.
(let [angle (:angle state)
x (* 150 (q/cos angle))
y (* 150 (q/sin angle))]
; Move origin point to the center of the sketch.
(q/with-translation [(/ (q/width) 2)
(/ (q/height) 2)]
; Draw the circle.
(q/ellipse x y 100 100))))
(q/defsketch my-stuff
:title "You spin my circle right round"
:size [500 500]
; setup function called only once, during sketch initialization.
:setup setup
; update-state is called on each iteration before draw-state.
:update update-state
:draw draw-state
:features [:keep-on-top]
; This sketch uses functional-mode middleware.
; Check quil wiki for more info about middlewares and particularly
; fun-mode.
:middleware [m/fun-mode])
I'm excited to use Quil but I've hit a roadblock.
Upon creating a new quil using
lein new quil my-stuff
and runninglein run
in terminal, I'm getting this error:I haven't changed anything within the project other than my project.clj to include
:main my-stuff.core
My specs are: macos (big sur) openjdk 11.0.12 clojure 1.10.1 leiningen 2.9.6 quil 3.1.0 processing 3.5.4
Would love someone's help troubleshooting, I'm new to java and clojure and may well be overlooking something.