Passing object of type "Print" into function

Hello
I am using this library in my code: GitHub - blackketter/LuaArduino: Library for adding a Lua interpreter to Arduino sketches and one of the functions I need to use is called setOut(), which sets the output of the Lua interpreter to a Print type object:

// from the library header file
void setOut(Print* p) { out = p; };

I have made a custom class that implements the Print class to handle the output of the Lua interpreter like so:

class Terminal : public Print {
  public:
    size_t write(uint8_t a) {
      //custom print function
    }
  private:
    // private stuf
};
Terminal term;

But when I try to pass it into the setOut function I get an error:

no matching function for call to 'Lua::setOut(Terminal&)'

How can I pass "term" as a "Print" type object so that any output from Lua gets passed to the Terminal object?
Btw I am using a Feather M4

&Terminal

Thanks, that worked