I am using Visual C++ 6.0 and I am unable to compile any applications using
SDL_ttf. I recieve the following errors:
q:\sdl\sdl_ttf\sdl_ttf.h(61) : error C2143: syntax error : missing '{'
before 'const’
q:\sdl\sdl_ttf\sdl_ttf.h(61) : error C2143: syntax error : missing '{'
before '*'
q:\sdl\sdl_ttf\sdl_ttf.h(61) : error C2061: syntax error :
identifier 'TTF_Linked_Version’
q:\sdl\sdl_ttf\sdl_ttf.h(61) : error C2059: syntax error : ';'
q:\sdl\sdl_ttf\sdl_ttf.h(61) : error C2059: syntax error : 'type’
q:\sdl\sdl_ttf\sdl_ttf.h(71) : error C2054: expected ‘(’ to follow 'DECLSPEC’
q:\sdl\sdl_ttf\sdl_ttf.h(71) : error C2085: ‘SDLCALL’ : not in formal
parameter list
q:\sdl\sdl_ttf\sdl_ttf.h(71) : error C2146: syntax error : missing ‘,’ before
identifier 'TTF_ByteSwappedUNICODE’
q:\sdl\sdl_ttf\sdl_ttf.h(71) : error C2143: syntax error : missing ';'
before '('
q:\sdl\sdl_ttf\sdl_ttf.h(71) : error C2059: syntax error : ')'
q:\sdl\sdl_ttf\sdl_ttf.h(77) : error C2054: expected ‘(’ to follow 'DECLSPEC’
q:\sdl\sdl_ttf\sdl_ttf.h(77) : error C2085: ‘SDLCALL’ : not in formal
parameter list
q:\sdl\sdl_ttf\sdl_ttf.h(77) : error C2146: syntax error : missing ‘,’ before
identifier 'TTF_Init’
q:\sdl\sdl_ttf\sdl_ttf.h(77) : error C2143: syntax error : missing ';'
before '('
q:\sdl\sdl_ttf\sdl_ttf.h(77) : error C2059: syntax error : ')'
q:\sdl\sdl_ttf\sdl_ttf.h(83) : error C2054: expected ‘(’ to follow 'DECLSPEC’
q:\sdl\sdl_ttf\sdl_ttf.h(83) : error C2085: ‘SDLCALL’ : not in formal
parameter list
q:\sdl\sdl_ttf\sdl_ttf.h(83) : error C2146: syntax error : missing ‘,’ before
identifier 'TTF_OpenFont’
q:\sdl\sdl_ttf\sdl_ttf.h(83) : error C2143: syntax error : missing ';'
before '('
q:\sdl\sdl_ttf\sdl_ttf.h(83) : error C2059: syntax error : ')'
q:\sdl\sdl_ttf\sdl_ttf.h(84) : error C2054: expected ‘(’ to follow 'DECLSPEC’
q:\sdl\sdl_ttf\sdl_ttf.h(84) : error C2085: ‘SDLCALL’ : not in formal
parameter list
q:\sdl\sdl_ttf\sdl_ttf.h(84) : error C2146: syntax error : missing ‘,’ before
identifier 'TTF_OpenFontIndex’
q:\sdl\sdl_ttf\sdl_ttf.h(84) : error C2143: syntax error : missing ';'
before '('
q:\sdl\sdl_ttf\sdl_ttf.h(84) : error C2059: syntax error : ')'
q:\sdl\sdl_ttf\sdl_ttf.h(85) : error C2054: expected ‘(’ to follow 'DECLSPEC’
q:\sdl\sdl_ttf\sdl_ttf.h(85) : error C2085: ‘SDLCALL’ : not in formal
parameter list
q:\sdl\sdl_ttf\sdl_ttf.h(85) : error C2146: syntax error : missing ‘,’ before
identifier 'TTF_OpenFontRW’
q:\sdl\sdl_ttf\sdl_ttf.h(85) : error C2143: syntax error : missing ';'
before '('
q:\sdl\sdl_ttf\sdl_ttf.h(85) : error C2059: syntax error : ')'
etc…etc…
Now all these are due to the extern function. I am not sure what exactly th
eproblem is besides the fact either MSVC++ does not like the definitions, or
it does not like the definitions because it won’t go into C style definitions.
I would fix this myself but I lack the skill and familiarity with SDL_ttf.
Does anyone have any answers? Thanks for the help.
(I am actually trying to compile the source from the Super Mario Clone and
that requires SDL_ttf. Somehow it compiles fine for them.)
Nathaniel Husted