Facing a lot of errors: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TTF*

Hello. I am trying to build an old software that uses SDL 1.2 and at some point of the compilation process, it start to spit a lot of erros like these:

SDL_ttf.h:67:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TTF_Linked_Version’
extern DECLSPEC const SDL_version * SDLCALL TTF_Linked_Version(void);

SDL_ttf.h:138:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘TTF_SizeText’
extern DECLSPEC int SDLCALL TTF_SizeText(TTF_Font *font, const char *text, int *w, int *h);

SDL_ttf.h:222:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘TTF_WasInit’
extern DECLSPEC int SDLCALL TTF_WasInit(void);

So what is causing them and how can I solve these?