id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,game 1180,Sword2 engine won't compile with older g++,SF/aiviru,fingolfin,"{{{#!Markdown Main reason I'm reporting this is that unless you massage some files by hand, this is pretty critical combined with bug \#793762. If fixing that is deemed sufficient to fix breakage, by all means feel free to ignore this report ;\) When using at least g++ 2.95.4 to compile scummvm, the sword2 engine will not want to build. This problem doesn't occur in at least g++ 3.0.4. As per scummvm-20030823.tar.bz2 \(but also earlier versions\) the error is: g++ -Wp,-MMD,"bs2/.deps/anims.d2" -O -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -g -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -DHAVE\_CONFIG\_H -DUNIX -I. -Icommon -I/usr/include/SDL -D\_REENTRANT -c bs2/anims.cpp -o bs2/anims.o In file included from bs2/anims.cpp:32: bs2/driver/driver96.h:1271: invalid use of undefined type \`class Surface' bs2/driver/driver96.h:1252: forward declaration of \`class Surface' bs2/driver/driver96.h:1271: \`s' was not declared in this scope bs2/driver/driver96.h:1271: parse error before \`\*' bs2/driver/driver96.h:1272: invalid use of undefined type \`class Surface' bs2/driver/driver96.h:1252: forward declaration of \`class Surface' bs2/driver/driver96.h:1272: \`s' was not declared in this scope bs2/driver/driver96.h:1272: parse error before \`\*' bs2/driver/driver96.h:1272: \`Surface::blit\(...\)' has already been declared in \`Surface' make: \*\*\* \[bs2/anims.o\] Error 1 Sys info: \[aiviru@blight ~/src/scummvm\]$ uname -a Linux blight 2.4.18-bf2.4 \#1 Son Apr 14 09:53:28 CEST 2002 i686 unknown \[aiviru@blight ~/src/scummvm\]$ g++ -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 \(Debian prerelease\) And a g++ that DOES work:\[aiviru@blight ~/src/scummvm\]$ g++-3.0 -v Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.4/specs Configured with: ../src/configure -v \--enable-languages=c,c++,java,f77,proto,objc \--prefix=/usr --infodir=/share/info --mandir=/share/man \--enable-shared --with-gnu-as --with-gnu-ld \--with-system-zlib --enable-long-long --enable-nls \--without-included-gettext --disable-checking \--enable-threads=posix --enable-java-gc=boehm \--with-cpp-install-dir=bin --enable-objc-gc i386-linux Thread model: posix gcc version 3.0.4 }}} {{{#!div style=""font-size: 75%"" Ticket imported from: !#793767. Ticket imported from: bugs/1180. }}}",defect,closed,normal,Engine: Sword2,,fixed,,,Broken Sword 2