/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or directory

I get errors like these when I try to build my program.:

/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or
directory
/usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:114:24: error: close_code.h: No such
file or directory

And it goes on and on. I have SDL.h:

michael at camille ourrpg $ locate SDL.h
/usr/include/SDL/SDL.h

It SHOULD even know where it is:

michael at camille ourrpg $ sdl-config --cflags
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
michael at camille ourrpg $ sdl-config --libs
-lSDL -lpthread

But I’ve tried to build this thing several times and it always fails
with errors about finding SDL library files… Here’s my Makefile:

michael at camille ourrpg $ cat Makefile
CXX=g++

CFLAGS= -W -Wall -pedantic -dH sdl-config --cflags

LIBS=sdl-config --libs -lSDL_image -lSDL_gfx -lSDL_ttf

OBJS = ally.o battle.o character.o enemy party.o allyparty.o
enemyparty.o

INCS = battle.h character.h

all: battle

battle: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS)

%.o : %.cpp $(INCS)
$(CXX) $(CFLAGS) -c $<

clean:
-rm *.o ~ core battle

I’m sure it’s not very good; it’s my first Makefile. But it worked up
until the last few changes I’ve made to my program. What’s going on
here?
-Michael Sullivan-

SDL_image.h is in /usr/local/include not /usr/include? -I/usr/local/include added to your CFLAGS?

m.> -----Original Message-----

From: sdl-bounces at lists.libsdl.org [mailto:sdl-
bounces at lists.libsdl.org] On Behalf Of Michael Sullivan
Sent: Wednesday, July 28, 2010 12:48 PM
To: sdl at lists.libsdl.org
Subject: [SDL] /usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h:
No such file or directory

I get errors like these when I try to build my program.:

/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or
directory
/usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:114:24: error: close_code.h: No such
file or directory

And it goes on and on. I have SDL.h:

michael at camille ourrpg $ locate SDL.h
/usr/include/SDL/SDL.h

It SHOULD even know where it is:

michael at camille ourrpg $ sdl-config --cflags
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
michael at camille ourrpg $ sdl-config --libs
-lSDL -lpthread

But I’ve tried to build this thing several times and it always fails
with errors about finding SDL library files… Here’s my Makefile:

michael at camille ourrpg $ cat Makefile
CXX=g++

CFLAGS= -W -Wall -pedantic -dH sdl-config --cflags

LIBS=sdl-config --libs -lSDL_image -lSDL_gfx -lSDL_ttf

OBJS = ally.o battle.o character.o enemy party.o allyparty.o
enemyparty.o

INCS = battle.h character.h

all: battle

battle: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS)

%.o : %.cpp $(INCS)
$(CXX) $(CFLAGS) -c $<

clean:
-rm *.o ~ core battle

I’m sure it’s not very good; it’s my first Makefile. But it worked up
until the last few changes I’ve made to my program. What’s going on
here?
-Michael Sullivan-


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email


I’ve altered my Makefile to:

michael at camille ourrpg $ cat Makefile
CXX=g++

CFLAGS= -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags

LIBS=sdl-config --libs -lSDL_image -lSDL_gfx -lSDL_ttf

OBJS = ally.o battle.o character.o enemy party.o allyparty.o
enemyparty.o

INCS = battle.h character.h

all: battle

battle: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS)

%.o : %.cpp $(INCS)
$(CXX) $(CFLAGS) -c $<

clean:
-rm *.o ~ core battle

and rebuilt, but the errors haven’t changed…On Wed, 2010-07-28 at 09:55 -0700, Vance, Michael wrote:

SDL_image.h is in /usr/local/include not /usr/include? -I/usr/local/include added to your CFLAGS?

m.

Yeah, I misread your output anyway, wasn’t sensible advice, sorry ;). Your setup looks fine, have you tried building gcc with -H to see if it’s picking up headers you didn’t expect? Also try invoking make with -n to make sure the gcc command line it is using is what you expect.

m.> -----Original Message-----

From: sdl-bounces at lists.libsdl.org [mailto:sdl-
bounces at lists.libsdl.org] On Behalf Of Michael Sullivan
Sent: Wednesday, July 28, 2010 1:01 PM
To: SDL Development List
Subject: Re: [SDL] /usr/local/include/SDL/SDL_image.h:28:17: error:
SDL.h: No such file or directory

On Wed, 2010-07-28 at 09:55 -0700, Vance, Michael wrote:

SDL_image.h is in /usr/local/include not /usr/include? -
I/usr/local/include added to your CFLAGS?

m.

I’ve altered my Makefile to:

michael at camille ourrpg $ cat Makefile
CXX=g++

CFLAGS= -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags

LIBS=sdl-config --libs -lSDL_image -lSDL_gfx -lSDL_ttf

OBJS = ally.o battle.o character.o enemy party.o allyparty.o
enemyparty.o

INCS = battle.h character.h

all: battle

battle: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS)

%.o : %.cpp $(INCS)
$(CXX) $(CFLAGS) -c $<

clean:
-rm *.o ~ core battle

and rebuilt, but the errors haven’t changed…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email


Yeah, I misread your output anyway, wasn’t sensible advice, sorry ;). Your setup looks fine, have you tried building gcc with -H to see if it’s picking up headers you didn’t expect? Also try invoking make with -n to make sure the gcc command line it is using is what you expect.

m.

bounces at lists.libsdl.org] On Behalf Of Michael Sullivan
SDL.h: No such file or directory

SDL_image.h is in /usr/local/include not /usr/include? -
I/usr/local/include added to your CFLAGS?

michael at camille ourrpg $ make -n
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c ally.cpp
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c battle.cpp
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c character.cpp
g++ enemy.cpp -o enemy
make: *** No rule to make target party.o', needed bybattle’. Stop.

and just to be clear I do not need the -I/usr/local/include line in
CFLAGS?On Wed, 2010-07-28 at 10:03 -0700, Vance, Michael wrote:

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-
Sent: Wednesday, July 28, 2010 1:01 PM
To: SDL Development List
Subject: Re: [SDL] /usr/local/include/SDL/SDL_image.h:28:17: error:
On Wed, 2010-07-28 at 09:55 -0700, Vance, Michael wrote:

I added -H to the CFLAGS line in the Makefile. Here is the complete
output of make. I apologize for the length:

michael at camille ourrpg $ make
g++ -H -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags -c ally.cpp
. ally.h
… character.h
… /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/include/sys/types.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/stdio.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
… /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/xlocale.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
Multiple include guards may be useful for:
/usr/include/SDL/begin_code.h
/usr/include/SDL/close_code.h
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ -H -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags -c battle.cpp
. /usr/include/stdio.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
. /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/include/sys/types.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/xlocale.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
. /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
. /usr/include/SDL/SDL_gfxPrimitives.h
… /usr/include/math.h
… /usr/include/bits/huge_val.h
… /usr/include/bits/huge_valf.h
… /usr/include/bits/huge_vall.h
… /usr/include/bits/inf.h
… /usr/include/bits/nan.h
… /usr/include/bits/mathdef.h
… /usr/include/bits/mathcalls.h
… /usr/include/bits/mathcalls.h
… /usr/include/bits/mathcalls.h
… /usr/include/SDL/SDL.h
. battle.h
… /usr/local/include/SDL/SDL_ttf.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… character.h
battle.cpp: In member function ‘void Battle::init()’:
battle.cpp:55: warning: deprecated conversion from string constant to
’char*'
battle.cpp:56: warning: deprecated conversion from string constant to
’char*'
battle.cpp:57: warning: deprecated conversion from string constant to
’char*'
battle.cpp:58: warning: deprecated conversion from string constant to
’char*'
battle.cpp: In member function ‘SDL_Surface* Battle::drawString(int,
int, char*)’:
battle.cpp:89: warning: missing initializer for member
’SDL_Color::unused’
battle.cpp: In function ‘int main()’:
battle.cpp:189: warning: deprecated conversion from string constant to
’char*'
battle.cpp:190: warning: deprecated conversion from string constant to
’char*'
battle.cpp:191: warning: deprecated conversion from string constant to
’char*'
battle.cpp:192: warning: deprecated conversion from string constant to
’char*'
battle.cpp
Multiple include guards may be useful for:
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/huge_val.h
/usr/include/bits/huge_valf.h
/usr/include/bits/huge_vall.h
/usr/include/bits/inf.h
/usr/include/bits/mathdef.h
/usr/include/bits/nan.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ -H -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags -c character.cpp
. /usr/include/stdio.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
. /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/xlocale.h
… /usr/include/sys/types.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
. character.h
… /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
Multiple include guards may be useful for:
/usr/include/SDL/begin_code.h
/usr/include/SDL/close_code.h
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ enemy.cpp -o enemy
In file included from character.h:5,
from enemy.h:4,
from enemy.cpp:1:
/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or
directory
/usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:114:24: error: close_code.h: No such
file or directory
In file included from character.h:5,
from enemy.h:4,
from enemy.cpp:1:
/usr/local/include/SDL/SDL_image.h:57: error: expected initializer
before ‘const’
/usr/local/include/SDL/SDL_image.h:67: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:69: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:70: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:75: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:78: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:79: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:80: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:81: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:82: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:83: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:84: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:85: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:86: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:87: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:88: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:91: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:92: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:93: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:94: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:95: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:96: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:97: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:98: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:99: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:100: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:101: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:102: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:104: error: ‘DECLSPEC’ does not name
a type
In file included from enemy.h:4,
from enemy.cpp:1:
character.h:49: error: ISO C++ forbids declaration of ‘SDL_Surface’ with
no type
character.h:49: error: expected ‘;’ before ‘’ token
character.h:50: error: expected ;' before 'SDL_Rect' character.h:50: error: ISO C++ forbids declaration of 'SDL_Rect' with no type character.h:50: error: expected ';' before '*' token character.h:55: error: expected;’ before 'private’
character.h:62: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no
type
character.h:62: error: expected ‘;’ before '
’ token
character.h:63: error: ISO C++ forbids declaration of ‘SDL_Surface’ with
no type
character.h:63: error: expected ‘;’ before ‘*’ token

I think it looks like it’s finding SDL.h and the other files it needs…On Wed, 2010-07-28 at 10:03 -0700, Vance, Michael wrote:

Yeah, I misread your output anyway, wasn’t sensible advice, sorry ;). Your setup looks fine, have you tried building gcc with -H to see if it’s picking up headers you didn’t expect? Also try invoking make with -n to make sure the gcc command line it is using is what you expect.

m.

Looks like the problem is in your makefile. The enemy.o target isn’t
being compiled with the same options as ally.cpp, for example. I think
changing this line:

OBJS = ally.o battle.o character.o enemy party.o allyparty.o enemyparty.o

to this:

OBJS = ally.o battle.o character.o enemy.o party.o allyparty.o enemyparty.o

will fix it. You have “enemy” instead of “enemy.o” there.On Wed, Jul 28, 2010 at 1:39 PM, Michael Sullivan wrote:

On Wed, 2010-07-28 at 10:03 -0700, Vance, Michael wrote:

Yeah, I misread your output anyway, wasn’t sensible advice, sorry ;). Your setup looks fine, have you tried building gcc with -H to see if it’s picking up headers you didn’t expect? Also try invoking make with -n to make sure the gcc command line it is using is what you expect.

m.

I added -H to the CFLAGS line in the Makefile. ?Here is the complete
output of make. ?I apologize for the length:

michael at camille ourrpg $ make
g++ -H -W -Wall -pedantic -dH ?-I/usr/local/include sdl-config --cflags -c ally.cpp
. ally.h
… character.h
… /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/include/sys/types.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/stdio.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
… /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/xlocale.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
Multiple include guards may be useful for:
/usr/include/SDL/begin_code.h
/usr/include/SDL/close_code.h
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ -H -W -Wall -pedantic -dH ?-I/usr/local/include sdl-config --cflags -c battle.cpp
. /usr/include/stdio.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
. /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/include/sys/types.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/xlocale.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
. /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
. /usr/include/SDL/SDL_gfxPrimitives.h
… /usr/include/math.h
… /usr/include/bits/huge_val.h
… /usr/include/bits/huge_valf.h
… /usr/include/bits/huge_vall.h
… /usr/include/bits/inf.h
… /usr/include/bits/nan.h
… /usr/include/bits/mathdef.h
… /usr/include/bits/mathcalls.h
… /usr/include/bits/mathcalls.h
… /usr/include/bits/mathcalls.h
… /usr/include/SDL/SDL.h
. battle.h
… /usr/local/include/SDL/SDL_ttf.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… character.h
battle.cpp: In member function ‘void Battle::init()’:
battle.cpp:55: warning: deprecated conversion from string constant to
’char*'
battle.cpp:56: warning: deprecated conversion from string constant to
’char*'
battle.cpp:57: warning: deprecated conversion from string constant to
’char*'
battle.cpp:58: warning: deprecated conversion from string constant to
’char*'
battle.cpp: In member function ‘SDL_Surface* Battle::drawString(int,
int, char*)’:
battle.cpp:89: warning: missing initializer for member
’SDL_Color::unused’
battle.cpp: In function ‘int main()’:
battle.cpp:189: warning: deprecated conversion from string constant to
’char*'
battle.cpp:190: warning: deprecated conversion from string constant to
’char*'
battle.cpp:191: warning: deprecated conversion from string constant to
’char*‘
battle.cpp:192: warning: deprecated conversion from string constant to
’char*’
?battle.cpp
Multiple include guards may be useful for:
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/huge_val.h
/usr/include/bits/huge_valf.h
/usr/include/bits/huge_vall.h
/usr/include/bits/inf.h
/usr/include/bits/mathdef.h
/usr/include/bits/nan.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ -H -W -Wall -pedantic -dH ?-I/usr/local/include sdl-config --cflags -c character.cpp
. /usr/include/stdio.h
… /usr/include/features.h
… /usr/include/sys/cdefs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs.h
… /usr/include/bits/wordsize.h
… /usr/include/gnu/stubs-32.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/types.h
… /usr/include/bits/wordsize.h
… /usr/include/bits/typesizes.h
… /usr/include/libio.h
… /usr/include/_G_config.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/wchar.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/bits/stdio_lim.h
… /usr/include/bits/sys_errlist.h
. /usr/include/stdlib.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/bits/waitflags.h
… /usr/include/bits/waitstatus.h
… /usr/include/endian.h
… /usr/include/bits/endian.h
… /usr/include/bits/byteswap.h
… /usr/include/xlocale.h
… /usr/include/sys/types.h
… /usr/include/time.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/sys/select.h
… /usr/include/bits/select.h
… /usr/include/bits/sigset.h
… /usr/include/time.h
… /usr/include/bits/time.h
… /usr/include/sys/sysmacros.h
… /usr/include/bits/pthreadtypes.h
… /usr/include/alloca.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
. character.h
… /usr/local/include/SDL/SDL_image.h
… /usr/include/SDL/SDL.h
… /usr/include/SDL/SDL_main.h
… /usr/include/SDL/SDL_stdinc.h
… /usr/include/SDL/SDL_config.h
… /usr/include/SDL/SDL_platform.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stdarg.h
… /usr/include/string.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/strings.h
… /usr/include/inttypes.h
… /usr/include/stdint.h
… /usr/include/bits/wchar.h
… /usr/include/bits/wordsize.h
… /usr/include/ctype.h
… /usr/include/iconv.h
… /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_audio.h
… /usr/include/SDL/SDL_error.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_endian.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mutex.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_thread.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_rwops.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cdrom.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_cpuinfo.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_events.h
… /usr/include/SDL/SDL_active.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_keyboard.h
… /usr/include/SDL/SDL_keysym.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_mouse.h
… /usr/include/SDL/SDL_video.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_joystick.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_quit.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_loadso.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_timer.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
… /usr/include/SDL/SDL_version.h
… /usr/include/SDL/begin_code.h
… /usr/include/SDL/close_code.h
Multiple include guards may be useful for:
/usr/include/SDL/begin_code.h
/usr/include/SDL/close_code.h
/usr/include/bits/byteswap.h
/usr/include/bits/endian.h
/usr/include/bits/select.h
/usr/include/bits/sigset.h
/usr/include/bits/stdio_lim.h
/usr/include/bits/sys_errlist.h
/usr/include/bits/time.h
/usr/include/bits/typesizes.h
/usr/include/bits/waitflags.h
/usr/include/bits/waitstatus.h
/usr/include/gnu/stubs-32.h
/usr/include/gnu/stubs.h
/usr/include/wchar.h
g++ ? ? enemy.cpp ? -o enemy
In file included from character.h:5,
? ? ? ? ? ? ? ? from enemy.h:4,
? ? ? ? ? ? ? ? from enemy.cpp:1:
/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or
directory
/usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such
file or directory
/usr/local/include/SDL/SDL_image.h:114:24: error: close_code.h: No such
file or directory
In file included from character.h:5,
? ? ? ? ? ? ? ? from enemy.h:4,
? ? ? ? ? ? ? ? from enemy.cpp:1:
/usr/local/include/SDL/SDL_image.h:57: error: expected initializer
before ‘const’
/usr/local/include/SDL/SDL_image.h:67: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:69: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:70: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:75: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:78: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:79: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:80: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:81: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:82: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:83: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:84: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:85: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:86: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:87: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:88: error: expected initializer
before ‘int’
/usr/local/include/SDL/SDL_image.h:91: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:92: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:93: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:94: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:95: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:96: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:97: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:98: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:99: error: ‘DECLSPEC’ does not name a
type
/usr/local/include/SDL/SDL_image.h:100: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:101: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:102: error: ‘DECLSPEC’ does not name
a type
/usr/local/include/SDL/SDL_image.h:104: error: ‘DECLSPEC’ does not name
a type
In file included from enemy.h:4,
? ? ? ? ? ? ? ? from enemy.cpp:1:
character.h:49: error: ISO C++ forbids declaration of ‘SDL_Surface’ with
no type
character.h:49: error: expected ‘;’ before ‘’ token
character.h:50: error: expected ;' before 'SDL_Rect' character.h:50: error: ISO C++ forbids declaration of 'SDL_Rect' with no type character.h:50: error: expected ';' before '*' token character.h:55: error: expected;’ before 'private’
character.h:62: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no
type
character.h:62: error: expected ‘;’ before '
’ token
character.h:63: error: ISO C++ forbids declaration of ‘SDL_Surface’ with
no type
character.h:63: error: expected ‘;’ before ‘*’ token

I think it looks like it’s finding SDL.h and the other files it needs…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I really don’t know, but maybe try moving SDL_image.h into /usr/include/SDL?

Jonny D

As Justin Coleman later pointed out, look at your last compilation line there.

Also use pastebin next time :).

m.> -----Original Message-----

From: sdl-bounces at lists.libsdl.org [mailto:sdl-
bounces at lists.libsdl.org] On Behalf Of Michael Sullivan
Sent: Wednesday, July 28, 2010 1:26 PM
To: SDL Development List
Subject: Re: [SDL] /usr/local/include/SDL/SDL_image.h:28:17: error:
SDL.h: No such file or directory

On Wed, 2010-07-28 at 10:03 -0700, Vance, Michael wrote:

Yeah, I misread your output anyway, wasn’t sensible advice, sorry ;).
Your setup looks fine, have you tried building gcc with -H to see if
it’s picking up headers you didn’t expect? Also try invoking make with
-n to make sure the gcc command line it is using is what you expect.

m.

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-
bounces at lists.libsdl.org] On Behalf Of Michael Sullivan
Sent: Wednesday, July 28, 2010 1:01 PM
To: SDL Development List
Subject: Re: [SDL] /usr/local/include/SDL/SDL_image.h:28:17: error:
SDL.h: No such file or directory

On Wed, 2010-07-28 at 09:55 -0700, Vance, Michael wrote:

SDL_image.h is in /usr/local/include not /usr/include? -
I/usr/local/include added to your CFLAGS?

michael at camille ourrpg $ make -n
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c ally.cpp
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c battle.cpp
g++ -W -Wall -pedantic -dH -I/usr/local/include sdl-config --cflags
-c character.cpp
g++ enemy.cpp -o enemy
make: *** No rule to make target party.o', needed bybattle’. Stop.

and just to be clear I do not need the -I/usr/local/include line in
CFLAGS?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email


The trick was, that file was found for some compile targets but not
for others. Looking at the actual compiler invocations (the g++…
lines) explained why, the enemy file was not getting the include
directory passed in correctly. Simple typo probably, but they can be a
bear to track down sometimes.On Wed, Jul 28, 2010 at 1:47 PM, Jonathan Dearborn wrote:

I really don’t know, but maybe try moving SDL_image.h into /usr/include/SDL?
Jonny D


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I made that change and rebuilt but the problem still exists. Wait a
minute! There are two SDL related files in /usr/local/include/SDL.
They don’t seem to belong to anything. I deleted them and it’s not
giving me those SDL errors anymore.On Wed, 2010-07-28 at 13:47 -0400, Justin Coleman wrote:

Looks like the problem is in your makefile. The enemy.o target isn’t
being compiled with the same options as ally.cpp, for example. I think
changing this line:

OBJS = ally.o battle.o character.o enemy party.o allyparty.o enemyparty.o

to this:

OBJS = ally.o battle.o character.o enemy.o party.o allyparty.o enemyparty.o

will fix it. You have “enemy” instead of “enemy.o” there.

I’d never heard of pastebin before you mentioned it just now. Emerging
it now…
-Michael Sullivan-On Wed, 2010-07-28 at 10:50 -0700, Vance, Michael wrote:

As Justin Coleman later pointed out, look at your last compilation line there.

Also use pastebin next time :).

m.

I think he was referring to http://pastebin.com/ which is a website
where you can upload source snippets etc, and get a link to them for
other people to browse easily.On Wed, Jul 28, 2010 at 2:09 PM, Michael Sullivan wrote:

On Wed, 2010-07-28 at 10:50 -0700, Vance, Michael wrote:

As Justin Coleman later pointed out, look at your last compilation line there.

Also use pastebin next time :).

m.
I’d never heard of pastebin before you mentioned it just now. ? Emerging
it now…
-Michael Sullivan-


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org