uLisp 4.4a extensions file


I’m using ulisp-arm 4.4a and trying out the Extensions file, but having difficulty getting it to compile. I tried saving the example “now” extensions in my ulisp-arm folder as “extensions.cpp” and it shows up as a second tab. Then I uncommented “#define extensions” in ulisp-arm.ino, but when I try compiling, it fails because it can’t see the definitions of “object” and such in the extensions file. This makes sense, as those definitions are not extern’ed. So I guess I shouldn’t save it as a .cpp file? I tried extensions.h and couldn’t get that to work either, as the ulisp-arm.cpp file couldn’t find the function tablesize(), which is now defined in the extensions file. The only way I got the extensions to work was by physically copying and pasting the contents of the extensions file into the ulisp-arm.ino file.

Obviously I’m missing something about the way the Arduino software deals with multiple files in the same directory. What am I doing wrong?



Try calling it “extensions.ino”. That’s how I’ve got it set up, and it seems to work OK. If that doesn’t fix it I’ll think further.


That worked, thanks!

So apparently Arduino concatenates all .ino files together before compiling? Good to know.



Great! I’ll add that to the documentation.