[SLE] gcc-2.95.3 can't compile a c++ sample SuSE 8.2 x86

From: Stefan Parvu (sp_at_sunguru.com)
Date: 08/30/03

  • Next message: Stefan Parvu: "Re: [SLE] SuSE 8.2 and cluster"
    To: suse-linux-e@suse.com
    Date: Sat, 30 Aug 2003 21:40:58 +0300
    
    

    Hi,

    I would like to report a problem about compiling a simple code with gcc (g++)
    from: /opt/gcc295/bin/gcc
    Im using the old gcc compiler.

    stefan@jupiter:~> gcc --version
    2.95.3

    stefan@jupiter:~> which gcc
    /opt/gcc295/bin/gcc

    Lyx-1.3.2 can't compile using gcc-2.95.3 due some problems I think with
    libstd++ . Have a look:

    #include <qglobal.h>
            #include <qstring.h>

    #ifdef F77_DUMMY_MAIN
    # ifdef __cplusplus
         extern "C"
    # endif
       int F77_DUMMY_MAIN() { return 1; }
    #endif
    int
    main ()
    {

            QString s("mangle_failure");
            #if (QT_VERSION < 221)
            break_me_(\\);
            #endif

      ;
      return 0;
    }

    This code works fine with gcc-3.3.1
    When I set my PATH to /opt/gcc295/bin the compiler will give:

    stefan@jupiter:~> export PATH=/opt/gcc295/bin:$PATH

    stefan@jupiter:~> g++ -O -Wno-non-template-friend -ftemplate-depth-30
    -I/usr/lib/qt3/include -L/usr/lib/qt3/lib -isystem /usr/X11R6/include test.cc
    -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt
    /tmp/ccRoZCNx.o(.text+0x13): In function `main':
    : undefined reference to `QString::QString(char const *)'
    /tmp/ccRoZCNx.o(.text+0x23): In function `main':
    : undefined reference to `QString::shared_null'
    /tmp/ccRoZCNx.o(.text+0x2e): In function `main':
    : undefined reference to `QStringData::deleteSelf(void)'
    /tmp/ccRoZCNx.o(.text+0x4c): In function `main':
    : undefined reference to `QString::shared_null'
    /tmp/ccRoZCNx.o(.text+0x57): In function `main':
    : undefined reference to `QStringData::deleteSelf(void)'
    collect2: ld returned 1 exit status

    any idea what can we do. Lyx132 can't compile because ./configure fails
    exactly to this point.

    Many thanks
    Stefan

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Stefan Parvu: "Re: [SLE] SuSE 8.2 and cluster"

    Relevant Pages