Closed teodor-pripoae closed 12 years ago
you need to #import <Cocoa/Cocoa.h>
and #import <Foundation/Foundation.h>
, and the interface for FileHelper
needs to come before your use of FileHelper
objects (remember: eero, while fancy, is still ObjC. also note that you might be able to get around this by specifying class FileHelper
before main()
, but I haven't tested it).
update: class FileHelper
doesn't work, because you actually call the class's methods in main()
. to circumvent, put either the interface or the interface and implementation before main()
, or put the interface and implementation in another file and #import "FileHelper.eero"
Seems like a reasonable first thing to do to try to compile that code. Perhaps, to avoid many others repeating this problem, it might be useful to put a prominent link on that page to a compiling version (e.g. a gist).
@claybridges Or simply rewrite the main-page code.
Agreed. I rearranged the code and omitted some details to keep the front page compact, but in hindsight it wasn't a great idea. Keeping this issue open until I either change the code or create a link to a compiling version.
here you go: https://gist.github.com/3080412
also, i've written a python script, eeroc (executable, just drop it anywhere in your $PATH, like /usr/local/bin) that wraps around eero's clang installation for ease of use. with regards to the demo code, you don't have to #import
anything if you use eeroc
, simply: eeroc demo.eero -X --autoframework
, where -X
specifies to compile with Cocoa, Foundation, and AppKit, and --autoframework
slips those #import
statements in for compiling.
Updated with compilable version link (which also includes build/run instructions in the header comments). More samples to follow on github. Thanks guys!
I'm using the code listed here: http://eerolanguage.org/index.html
I'm getting the following compile error: