Bitlash not compiling

I am trying to compile Bitlash 2.0 RC3 on Arduino 0022 (the example script bitlashdemo). I get the following errors:

bitlash/bitlash.cpp.o: In function findscript(char*)': /Users/narwhal/Documents/Arduino/libraries/bitlash/src/bitlash-parser.c:629: undefined reference to scriptfileexists(char*)’
bitlash/bitlash.cpp.o: In function primec()': /Users/narwhal/Documents/Arduino/libraries/bitlash/src/bitlash-instream.c:274: undefined reference to scriptread()’
bitlash/bitlash.cpp.o: In function initparsepoint(unsigned char, long, char*)': /Users/narwhal/Documents/Arduino/libraries/bitlash/src/bitlash-instream.c:211: undefined reference to scriptopen(char*, long, unsigned char)’
bitlash/bitlash.cpp.o: In function markparsepoint()': /Users/narwhal/Documents/Arduino/libraries/bitlash/src/bitlash-instream.c:167: undefined reference to scriptgetpos()’

Does anyone have any experience with getting bitlash to compile?

It looks like the "SD Card support" parts of Bitlash 2.0 Release Candidate 3d are not quite ready to use.

If you go into src/bitlash-instream.c and comment out the "#define SDFILE" the demo will compile without error.

As the author of Bitlash I apologize for this issue. This version is shipped in a configuration that compiles the bitlashsd example correctly, but the other examples require a tweak to compile. The proposed tweak above is correct: turn off SDFILE support if you're not compiling the BitlashSD demo. It's in the README, but it has bit several people.

I haven't figured out a way to get the build environment to conditionally include code in the (Bitlash) library based on an #include in a sketch. The mechanics of the library portion of the build process seem to prevent it. I would love to be educated so I can ship without this bug.

Feedback would be welcome.

Best regards,

-br

http://entropymouse.com

Thanks for the advice it worked. I guess I should read README's next time.

Do you know if callbacks are supported by Bitlash? (As in, if an event happens on the microcontroller I can call a function in the bitlash scripting environment to execute code for that event)

Callbacks are sort of roll-your-own but it's easy. The bitlashclock example has code that shows how to check for and call a Bitlash function from C code:

	if (getValue("onsecond") >= 0) doCommand("onsecond");

Does that help?

-br

http://entropymouse.com