adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Gcc 2.95 compile error


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] Gcc 2.95 compile error
Date: Mon, 1 Jul 2002 21:51:13 +0200

> DIRECTORY OPTIONS
>        These options specify directories  to  search  for  header
>        files, for libraries and for parts of the compiler:
> 
>        -I-    Any directories you specify with `-I'  options  beĀ­
>               fore  the  `-I-'  option  are searched only for the
>               case of `#include "file"'; they  are  not  searched
>               for `#include <file>'.
> 
>               If  additional  directories are specified with `-I'
>               options after  the  `-I-',  these  directories  are
>               searched for all `#include' directives.  (OrdinariĀ­
>               ly all `-I' directories are used this way.)
> 
> So a '-I.. -I-' should get rid of the problem if I understand the
> above correctly.

Arrrk. Unfortunately, no. No matter where I place it, I always have:
c++ -DHAVE_CONFIG_H -I. -I. -I../..   -I./.. -I-  -I/usr/include/SDL
-D_REENTRANT -I/usr/include/python2.1  -g -Wall -fno-exceptions
-fno-rtti  -DDATA_DIR="\"/usr/local/share/adonthell\""  -c image.cc
In file included from image.cc:25:
/usr/local/include/SDL/SDL_endian.h:127: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:128: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:129: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:130: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:131: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:132: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:135: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:136: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:137: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:138: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:139: syntax error before `('
/usr/local/include/SDL/SDL_endian.h:140: syntax error before `('

when compiling the gfx module. I can't get why, and this is very boring.
Anyway it wouldn't have helped, as when building the map module, even
though the correct "map" file is included this time, GCC 2.95 considers
"std" as the standard namespace, which makes that std::map and our "map"
namespace collide! So it doesn't help much, unfortunately. :( 2.95 is
really *crap* when it comes to C++.

Another problem that popped up is that, contrary to 3.1, 2.95 isn't
smart enough to guess that when we include a .h file that is located in
a subdirectory, and this file itself includes other .h files, they
should be looked at in the first .h file directory. For instance,
joltest.cc includes "gfx/image.h", which includes "screen.h". 2.95 will
claim that "screen.h" can't be found. So unless we use complete file
names in all our sub .h, it won't compile with 2.95. This wouldn't hurt
much however, so I've done it.

We can't really drop 2.95 compliance now. Many people are still using
it, and especially for external ports (Windows, PDAs, ...) cross
compilers are usually 2.95.

So, what to do with this 'map' mess, I don't know. Using capitals would
maybe do it, but it would also make accessors longer to type, and we use
then often enough to keep them as simple as possible.

I only see renaming there. As I'd like to see the CVS fixed this evening
(so Joel can continue to advance on moving the gui), I've moved all the
map related stuff into the "lmap" (as Land Map?) module. Please suggest
better (short) names! Don't forget to cvs update -Pd to ensure the old
map directory is removed. Once we have set up another name for the map
module, we could ask the Savannah guys to remove the obsolete
directories.

So, the good thing now is that everything compiles without a single
warning, on both 2.95 and 3.1! :) (excepted on SWIG generated files with
3.1) But if someone with a lot of vocabulary in English knows what to
rename the "map" module to...

See you tomorrow guys! (too tired -> goto bed)
Alex.
-- 
http://www.gnurou.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]