[SDL] #include "SDL.h"

Jacek Popławski jpopl at interia.pl
Wed Nov 12 11:57:01 PST 2003


This is probably well known question, but after browsing doc and archives I
can't find clear and offical answer.


1) I am testing following program:

----------------------------------
#include "SDL.h"

int main()
{
        return 0;
}
----------------------------------


2) I have only one SDL.h file, located in:

/usr/local/include/SDL/


3) "sdl-config --cflags" returns:

-I/usr/local/include/SDL -D_REENTRANT


4) compiling with gcc 2.95.3 works without warnings:

g++ -pedantic -Wall -o sdl-test.o -c `sdl-config --cflags` sdl-test.cc 


5) compiling with gcc 3.3 produces "long long" warnings:

/usr/local/gcc3/bin/g++ -pedantic -Wall -o sdl-test.o -c `sdl-config --cflags` sdl-test.cc 

In file included from /usr/local/include/SDL/SDL.h:34,
                 from sdl-test.cc:1:
/usr/local/include/SDL/SDL_types.h:65: warning: ISO C++ does not support `long 
   long'
/usr/local/include/SDL/SDL_types.h:67: warning: ISO C++ does not support `long 
   long'


6) When I change "SDL.h" to "SDL/SDL.h" it works without warnings.


7) Exactly same problem with <SDL.h> and <SDL/SDL.h>. So changing "" into <>
changes nothing in output, but adding 'SDL/' fixes warnings.


Could anyone explain why this happen?
	
-- 
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from http://decopter.sf.net




More information about the SDL mailing list