[SDL] #include "SDL.h"

Jacek Popławski jpopl at interia.pl
Sat Nov 15 01:40:01 PST 2003


On Sat, Nov 15, 2003 at 02:52:48AM -0500, Zephaniah E. Hull wrote:
> > > Look at the code by yourself in /usr/include/SDL/SDL_types.h :
> > 
> > But please re-read my question. I am not asking how to solve warning, I am
> > asking why <SDL.h> produces warning and <SDL/SDL.h> does not. What is
> > difference?
> 
> I am willing to bet you that <SDL.h> would not produce the warning, but
> "SDL.h" would.

That's why I said to re-read discussion. There is no difference in compiler
output between <SDL.h> and "SDL.h". I better paste it:

---------------------------------------------------------------------------
jp at darkwood:~/test$ cat sdl-test.cc 
#include <SDL.h>

int main()
{
        return 0;
}

jp at darkwood:~/test$ /usr/local/gcc3/bin/g++ -pedantic sdl-test.cc `sdl-config --cflags`
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'
---------------------------------------------------------------------------
jp at darkwood:~/test$ cat sdl-test.cc 
#include "SDL.h"

int main()
{
        return 0;
}
jp at darkwood:~/test$ /usr/local/gcc3/bin/g++ -pedantic sdl-test.cc `sdl-config --cflags`
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'
---------------------------------------------------------------------------
jp at darkwood:~/test$ cat sdl-test.cc 
#include "SDL/SDL.h"

int main()
{
        return 0;
}
jp at darkwood:~/test$ /usr/local/gcc3/bin/g++ -pedantic sdl-test.cc `sdl-config --cflags`
jp at darkwood:~/test$ 
---------------------------------------------------------------------------
jp at darkwood:~/test$ cat sdl-test.cc 
#include <SDL/SDL.h>

int main()
{
        return 0;
}
jp at darkwood:~/test$ /usr/local/gcc3/bin/g++ -pedantic sdl-test.cc `sdl-config --cflags`
jp at darkwood:~/test$ 
---------------------------------------------------------------------------
jp at darkwood:~/test$ sdl-config --cflags
-I/usr/local/include/SDL -D_REENTRANT
---------------------------------------------------------------------------
jp at darkwood:~/test$ find /usr/local/include -name SDL.h
/usr/local/include/SDL/SDL.h
---------------------------------------------------------------------------
jp at darkwood:~/test$ /usr/local/gcc3/bin/g++ --version
g++ (GCC) 3.3
---------------------------------------------------------------------------

I know this is not serious problem, but I think that it is interesting to find
why it happen. And both on irc and here everyone just repeat obvious things
about -pedantic/ansi and ""/<> which IMHO are not related.

-- 
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