Welcome! Please see the About page for a little more info on how this works.

0 votes
in Namespaces and vars by

I'm trying my first project with Membrane and it doen't look like I'm doing this right.

I create a test leiningen project.

I set the project.clj file dependancies to:

:dependencies [[org.clojure/clojure "1.11.1"] [com.phronemophobic/membrane "0.11.1.1-beta"]]

Added this to the top of the core.clj file:

(ns MyProj.core
(:require [membrane.ui :as ui])
(:gen-class))

I also pasted in some basic membrane code I found and kept the "-main" function.

I saved the file.
Ran "lein deps" from the command line. Lots of stuff loaded.

I open the Lein repl (lots of stuff loads) and see that the prompt is set to the name space.
I try running the "-main" function but get an error.

MyProj.core=> (-main)
Syntax error compiling at (/private/var/folders/m0/4krjx9mj4mx6p4zc4m372cv80000gn/T/form-init4189431604337866983.clj:1:1).
Unable to resolve symbol: -main in this context

What went wrong and how can I fix this?
Thanks in advance!

J

1 Answer

0 votes
by

This all looks like good setup. You need to actually define your -main function though.

(defn -main [] ...do stuff... )
Welcome to Clojure Q&A, where you can ask questions and receive answers from members of the Clojure community.
...