error: 'CLASS' does not name a type only when creating object inside another object
I think these lines still need to be in your main sketch file (in addition to being in your custom class file):

#include &lt;Adafruit_LEDBackpack.h&gt;
#include &lt;Adafruit_GFX.h&gt;


If I remember the Arduino IDE quirks correctly, it uses the #include directives in the main sketch file to determine which libraries to actually link. It's one of those annoying features that was intended to be beginner-friendly but sometimes just makes things more confusing.