Q: clojure-objc-sample

55 views
Skip to first unread message

Christopher Graham

unread,
May 8, 2015, 1:44:45 AM5/8/15
to clojure-ob...@googlegroups.com
Please advise... I'm not clear about this statement:
Edit project.clj with your j2objc and clojure-objc locations.

Running lein objcbuild in the sample's project directory results in:
Compiling sample.core
java.lang.RuntimeException: Unable to resolve symbol: $ in this context, compiling:(uikit/core.clj:7:13)

What config info do I need to add, and where, in order to successfully build and run the sample app?

Thank-you.

Gal Dolber

unread,
May 8, 2015, 2:33:22 AM5/8/15
to Christopher Graham, clojure-ob...@googlegroups.com
Hi Christopher,

The only file you need to edit is: "sample/sample/Config.xcconfig"
Be sure the be using lein-objcbuild 0.1.5, the first time you run "lein objcbuild" it downloads the binaries into ~/.clojure-objc/{version}, and thats the path you need to update in Config.xcconfig, for example:

CLOJUREOBJC="/Users/admin/.clojure-objc/1.7.0-beta2"

The error you get about $ may be because you are including clojure with another dependency, can you show me your project.clj file?
Be sure to exclude clojure from your dependencies:

[org.clojure/data.codec "0.1.0" :exclusions [org.clojure/clojure]]

Best

--
You received this message because you are subscribed to the Google Groups "clojure-objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-dis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Graham

unread,
May 8, 2015, 2:36:10 PM5/8/15
to clojure-ob...@googlegroups.com, g...@dolber.com
Yes, I edited Config.xcconfig correctly.

The project.clj file is simply the one that ships with the sample project:

(defproject clojure-objc-sample "0.1.0-SNAPSHOT"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[lein-objcbuild "0.1.5"]]
; uncomment to run on device
:objcbuild {:archs [:i386 :x86_64 #_:armv7 #_:armv7s]}
:aot :all
:dependencies [[uikit "0.1.5"]
[galdolber/clojure-objc "1.7.0-beta2"]])

Adding [org.clojure/data.codec "0.1.0" :exclusions [org.clojure/clojure]] to the vector value of :dependencies doesn’t help.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-discuss+unsub...@googlegroups.com.

Gal Dolber

unread,
May 8, 2015, 4:44:29 PM5/8/15
to Christopher Graham, clojure-ob...@googlegroups.com
You don't need to add data.codec, thats an example to exclude clojure from a dependency.
The issue may come from ~/.lein/profiles.clj
Are you adding any dependency there?
Try doing lein deps :tree and see if there's any extra dependency there.
What I did is add " :exclusions [org.clojure/clojure]" to every dependency and plugin on profiles.clj.

To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-dis...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "clojure-objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-dis...@googlegroups.com.

Christopher Graham

unread,
May 8, 2015, 10:45:10 PM5/8/15
to clojure-ob...@googlegroups.com, g...@dolber.com
The sample is compiling and running on the simulator now, thanks for your help.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "clojure-objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-objc-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages