My problem is straightforward: I am using SDL to create a simple simulation and I want to store instances of TTF_Font type in smart pointers (shared_ptr), but I keep getting this error:
"invalid application of ‘sizeof’ to incomplete type '_TTF_Font'"
Is there any way to use smart pointers with incomplete types from external libraries without incorporating their source code into my program?
EDIT:
TTF_Font is declared as
typedef struct _TTF_Font TTF_Font;
_TTF_Font is in turn defined in compiled external library.
My usage of TTF_Font is simply just constructing a new stack allocated instance of shared_ptr with a raw pointer to TTF_Font:
auto font_sp = std::shared_ptr<TTF_Font>(font_p);
I don't use sizeof explicitly here.