I am trying to build a custom class in C++ to be used by multiple sketches. The C++ sources have been built with core-firmware and flashed successfully.
However, when I try to use the custom class, in the Spark web IDE I get compilation error such as:
error: ‘CustomClass’ was not declared in this scope
It looks like the custom class, although compiled successfully, has not been exposed and therefore cannot be used by user-level sketch yet.
I have been following existing examples such as the SparkClass in spark_utilities.h and spark_utilities.cpp, and included the header file of the custom class in application.h in core-firmware/inc/. But so far these symbols are not accessible by user-level code in Spark web IDE.
Am I on the right path or should I try a different approach?
Again, if anyone has any tips on how to develop C/C++ library for the Spark, I thank you for any info you might send my way.