X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Andris Pavenis To: djgpp AT delorie DOT com Subject: Re: frustrating error installing ALLGRO Date: Mon, 13 Jun 2005 08:53:14 +0300 User-Agent: KMail/1.8.1 References: <1118629660 DOT 208843 DOT 3200 AT g43g2000cwa DOT googlegroups DOT com> In-Reply-To: <1118629660.208843.3200@g43g2000cwa.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506130853.14252.pavenis@latnet.lv> X-Virus-Scanned: amavisd-new at fgi.fi Reply-To: djgpp AT delorie DOT com On Monday 13 June 2005 05:27, quoll wrote: > Trying to install DJGPP and Allegro > which I have installed successfully > over the past few years. > I am using win2000. > Here is my bat file to get to > Allegro directory using DOS window. > > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. > src/fli.c: In function 'do_fli_256_color': > src/fli.c:319: error: invalid lvalue in increment That feature was deprecated in gcc-3.4.X and is removed in gcc-4.0.0 > lib/djgpp/liballeg.a(vbeafex.o):vbeafex.c:(.text+0x77f): undefined > reference to `_int_ds' > lib/djgpp/liballeg.a(vbeafex.o):vbeafex.c:(.text+0x79c): undefined > reference to `_int_ds' > lib/djgpp/liballeg.a(vbeafex.o):vbeafex.c:(.text+0x7a7): undefined > reference to `_int_ds' > lib/djgpp/liballeg.a(vbeafex.o):vbeafex.c:(.text+0x7ce): undefined > reference to `_int_ds' That looks like one problem with gcc-3.4.0 and above (so including gcc-4.0.0): static variables which is not referenced in C or C++ code are removed when optimizing. Try GCC command line option -fno-unit-at-a-time ---------------------------------------------------------------------------- `-funit-at-a-time' Parse the whole compilation unit before starting to produce code. This allows some extra optimizations to take place but consumes more memory (in general). There are some compatibility issues with _unit-at-at-time_ mode: * enabling _unit-at-a-time_ mode may change the order in which functions, variables, and top-level `asm' statements are emitted, and will likely break code relying on some particular ordering. The majority of such top-level `asm' statements, though, can be replaced by `section' attributes. * _unit-at-a-time_ mode removes unreferenced static variables and functions are removed. This may result in undefined references when an `asm' statement refers directly to variables or functions that are otherwise unused. In that case either the variable/function shall be listed as an operand of the `asm' statement operand or, in the case of top-level `asm' statements the attribute `used' shall be used on the declaration. * Static functions now can use non-standard passing conventions that may break `asm' statements calling functions directly. Again, attribute `used' will prevent this behavior. As a temporary workaround, `-fno-unit-at-a-time' can be used, but this scheme may not be supported by future releases of GCC. Enabled at levels `-O2', `-O3'. ------------------------------------------------------------------------------------- > collect2: ld returned 1 exit status > make.exe: *** [demo/demo.exe] Error 1 > make.exe: *** [obj/djgpp/alleg/fli.o] Error 1 > > What am I doing wrong ? So it looks like Allegro is not compatible (yet) with gcc-4.0.0. One can compile Allegro with old GCC version (like gcc-3.3.6) and other sources with gcc-4.0.0. Just make sure that all C++ sources (if any) are compiled with the same GCC version Andris