./exc: /home/dave/opt/gnu/lib/libstdc++.so.4: no version information available (required by ./exc)

John David Anglin dave@hiauly1.hia.nrc.ca
Mon Feb 25 13:40:00 GMT 2002


This test program:

     #include <stdio.h>
     void raise_exception ();
     int main (void)
     {
       int i = 5;

       try {
         raise_exception ();
         printf ("SHOULD NOT BE THERE !!\n");
       }
       catch (double x) {
         printf ("Got x = %f, i = %d\n", x, i);
       }

      return 0;
     }

     void raise_exception ()
     {
       throw (17.);
     }

when compiled with:

     g++ -fexceptions -o exc exc.cc

causes the following messages

     dave@gsyprf11:~/gcc_test$ ./exc
     ./exc: /home/dave/opt/gnu/lib/libstdc++.so.4: no version information available (
     required by ./exc)
     ./exc: /home/dave/opt/gnu/lib/libstdc++.so.4: no version information available (
required by ./exc)

under hppa-linux with the current source.  This is a new warning.  What's
needed to fix it?

Another issue, I tried running the testsuite with "-static" but it appears
this can't be done because the compile command uses "-shared-libgcc" and
ld then doesn't find the eh routines.  For example,

dave@gsyprf11:~/gcc_test$ g++ -shared-libgcc -fexceptions -o exc exc.cc -static
/home/dave/opt/gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Libstdc++ mailing list