c++ - SDL_TTF header giving me trouble -
After a virus forced me to reset the factory condition, I was trying to install SDL on my computer Was there. It was easy to run SDLs with my IDE, CodeBlocks, but setting up the extension library is so low that CodeBlocks recognizes the existence of libraries, but I am giving a lot of errors inside the SDL_ttf header and the SDL_image header. The section of the code is:
/ * Set for C function definitions, even if C ++ * / #ifdef __cplusplus extern "C" {# Endif
first line error "generates error: expected The ineffable-id string before continuous ", and the third line generates the error above and error" error: 'before the end of the expected'} 'line. I guess there could be something in it that the SDL was written in C. And maybe my codeboxes have not been configured to recognize C.
Edit: The test source code is:
SDL_Surface * imageBlitingFunctions :: loadText ( Uint8 red, Uint8 blue, Uint8 green, std :: string fontname, int fontSize, std :: s String text) {SDL_Color textColor = {red, blue, green}; TTF_Font * font1 = TTF_OpenFont (fontname.c_str (), fontSize); SDL_Surface * message1 = TTF_RenderText_Solid (font1, text.c_str (), text color); Return message 1; }
detected the problem. Apparently the project file was corrupted in any way, so I just transferred the scripts to another project and everything is working fine.
Comments
Post a Comment