AnsweredAssumed Answered

SDL_config_minimal.h redefines size_t

Question asked by karthikeyan on Feb 1, 2012
Latest reply on Feb 1, 2012 by Aaronwu

Hi,

    I was trying to compile my custom SDL application using the include folder inside the /lib/libsdl folder. I was also including stdio.h (along with SDL.h). And when I compile the project, I get the following error. size_t is redefined in SDL_config_minimal.h. Previous definition was found in stddef.h. I found a similar bug report and fix for the SDL mentioned in the libSDL site at http://hg.libsdl.org/SDL/rev/6290f9bd097d. But the fix is not reflected in their release versions. I have posted my concerns to the SDL forums at http://forums.libsdl.org/viewtopic.php?t=7904. But later I found that there are another set of include files that are got from /staging folder. I used these header files and then I was able to compile the application properly. These header file (from /staging ) are totally different from the header files from the /lib/libsdl folder. My concerns and doubt are as below.

 

  1. Is it a proper way to use some other header files rather than the header files that are used to compile the libraries?
  2. Where does the header files in the staging directory comes from? In other words, how are the header files in the staging folder created?
  3. Is there any other reason to use the header files in the staging folder than using the header files that come with the actual source codes?

 

Thanks,

Karthikeyan

Outcomes