I'm using ino for Arduino, and I'm creating a library however it isn't found during build

From Tronche's wiki
Jump to: navigation, search

inotools is a great tool to work with the Arduino, however it sometimes lacks documentation.

How to create your own library and have it discovered by ino ?

(commands are taken from Linux)

In short, it should be inside a directory in the lib directory of the ino project: after ino init, there are two directories in the project: lib and src.

You should create a directory there for your library and put the .h and .cpp files there, for example lib/MyLib/MyLib.h and lib/MyLib.cpp. Your sketch.ino to call the library is in src.

If you already experimented in the directory, ino may miss it, so erase the .build directory:

rm -rf .build

Then

ino build

and it should work.

By the way the include should use " and not <>:

#include "MyLib.h"

(no need to put #include "MyLib/MyLib.h")

Personal tools