lucian <lucian@xxxxxxxxxxxxxxxxx> writes: > Hello everyone! > I didn`t really mean to but it did it! I`ve just updated gcc to > gcc3.3 on my debian machine (with apt while getting other stuff) I cannot tell wether you installed from source or from binary debian packages. If the latter, also try asking in debian forums about possible package problems; gcc is not friendly to packaing tools like deb and rpm. (Worse, linux distros like to slice up gcc into different packages after the binaries are built, something that as far as I know was never intended to work.) > Now, trying to compile anything a bit more complicated (uses OpenGL , glut,qt which in the end need libstdc++ )fails : > > gcc -v main.c -lGL -lglut -o hand First, ensure that libglut was built by gcc 3.3 . If it was built by 3.1, 3.0, 2.96.x, or 2.95.x, it will not link with c++ code built by gcc 3.3 . Second, use 'g++' to link, not 'gcc'. I don't know if these things will fix your problem, but please try them and post again. _Unwind_Resume_or_Rethrow is defined in <prefix>/lib/libgcc_s.so Usually, g++ will figure out that you need this library and automagicly link it in. > Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs > Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux > Thread model: posix > gcc version 3.3 (Debian) > /usr/lib/gcc-lib/i386-linux/3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 main.c -quiet -dumpbase main.c -auxbase main -version -o /tmp/ccgBIs5D.s > GNU C version 3.3 (Debian) (i386-linux) > compiled by GNU C version 3.3 (Debian). > GGC heuristics: --param ggc-min-expand=73 --param ggc-min-heapsize=80613 > ignoring nonexistent directory "/usr/i386-linux/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/local/include > /usr/lib/gcc-lib/i386-linux/3.3/include > /usr/include > End of search list. > as -V -Qy -o /tmp/ccqcBZro.o /tmp/ccgBIs5D.s > GNU assembler version 2.14.90.0.4 (i386-linux) using BFD version 2.14.90.0.4 20030523 Debian GNU/Linux > /usr/lib/gcc-lib/i386-linux/3.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o hand /usr/lib/gcc-lib/i386-linux/3.3/../../../crt1.o /usr/lib/gcc-lib/i386-linux/3.3/../../../crti.o /usr/lib/gcc-lib/i386-linux/3.3/crtbegin.o -L/usr/lib/gcc-lib/i386-linux/3.3 -L/usr/lib/gcc-lib/i386-linux/3.3/../../.. /tmp/ccqcBZro.o -lGL -lglut -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-linux/3.3/crtend.o /usr/lib/gcc-lib/i386-linux/3.3/../../../crtn.o > /usr/bin/../lib/libstdc++.so.5: undefined reference to `_Unwind_Resume_or_Rethrow@xxxxxxx' > collect2: ld returned 1 exit status > > The problem is that the same error is occuring when trying to use > any other version of gcc (2.95,3.0,3.2) . [snip] I note gcc 3.3 is installed with --prefix=/usr . What --prefix was used for 2.95, 3.0, and 3.2 ? Each version of gcc should be installed with a differnt --prefix. For 3.0+, you can check --prefix by running gcc -v (as you did above).