shared_ptr with incomplete types from library
问题 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