[SDL] #include "SDL.h"

John Silicon jsilicon at earthlink.net
Sat Nov 15 17:18:01 PST 2003


I can't actually reproduce the problem (as I don't have a copy of GCC
installed here), but my guess would be that your search-path is setup so
that "SDL.H" resolves to a different file than "SDL/SDL.H".  Now, I'm not
sure, but I believe adding -H to your G++ command line will make it print
out the include files' full paths.

- Silicon

----- Original Message -----
From: "Jacek Popławski" <jpopl at interia.pl>
To: <sdl at libsdl.org>
Sent: Saturday, November 15, 2003 2:38 AM
Subject: Re: [SDL] #include "SDL.h"


> 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
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003





More information about the SDL mailing list