Error when trying to use a new library

I’m trying to make libraries for some devices I want to use, but when I try to include it in an app it complains that it can’t find it. To reproduce this problem you just need to import the library and try to use the example ino file as a new app and try to verify.

Am I missing something from my library? I tried following the guide here

Thanks

In file included from ../inc/spark_wiring.h:29:0,
from ../inc/application.h:29,
from FreqPeriodCounter/FreqPeriodCounter.h:15,
from FreqPeriodCounter/FreqPeriodCounter.cpp:33:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
In file included from FreqPeriodCounter/FreqPeriodCounter.cpp:33:0:
FreqPeriodCounter/FreqPeriodCounter.h: In constructor 'FreqPeriodCounter::FreqPeriodCounter(byte, long unsigned int (*)(), unsigned int)':
FreqPeriodCounter/FreqPeriodCounter.h:36:8: warning: 'FreqPeriodCounter::pin' will be initialized after [-Wreorder]
byte pin;
^
FreqPeriodCounter/FreqPeriodCounter.h:34:12: warning: 'unsigned int FreqPeriodCounter::debounceTime' [-Wreorder]
unsigned debounceTime;
^
FreqPeriodCounter/FreqPeriodCounter.cpp:35:1: warning: when initialized here [-Wreorder]
FreqPeriodCounter::FreqPeriodCounter(byte pin, unsigned long (*timeFunctionPtr)(), unsigned debounceTime):
^
rpm_demp.cpp:1:31: fatal error: FreqPeriodCounter.h: No such file or directory
#include "FreqPeriodCounter.h"
^
compilation terminated.
make: *** [rpm_demp.o] Error 1

In the .ino file, use #include "FreqPeriodCounter/FreqPeriodCounter.h"

2 Likes