Qt 1.40 and EGCS-1.1a (linux)

Scott W . Powers spowers@geomagic.com
Wed Sep 16 11:56:00 GMT 1998


Well, I didn't get any responses to this, but I thought I'd let you
know anyway.

I work on an SGI at work and it compiles Qt-1.40 without incident (CC v
7.2). However, egcs will not compile Qt unless you add in "-fno-rtti". I
would be very interested in hearing why this is the case? It seems it's
also needed for our C++ code at work (from the little I've been able to
compile), so if we're doing something wrong (the code at work compiles
both with SGIs CC and MS VC++5.0) I'd like to know what.

Or is this a problem with egcs that's being worked on?

I thought I read somewhere that you guys thought this problem was
fixed...So the question becomes is it not fixed or is the code
incorrect?

Hoping to get a response this time,
  Scott Powers

P.S. I'm _not_ on the egcs-bugs mailing list, so please CC me. Perhaps I
did get a response and just didn't know it. If that's the case, if
someone still has it laying around...could you forward it? Thanks...

Sometime around 11AM on 09/09/1998, Scott W . Powers said something like this:
> 
> I'm using linux 2.0.30 (Red Hat 4.2) multi-processor kernel (2 P2-233s,
> 128 megs, etc).
> 
> So I built binutils-2.9.1 and installed.
> 
> I then built egcs 1.1a with the default configuration (excepting I
> specified to use gas and gld) and installed.
> 
> I then went to build Qt 1.40. The libraries build without so much as a
> peep, but when the tutorials start building the 4th one causes the
> following:
> 
> cd t4; make
> make[2]: Entering directory `/opt/local/encap/qt-1.40/tutorial/t4'
> g++ -c -I/opt/local/encap/qt-1.40/include -g -o main.o main.cpp
> g++ -L/opt/local/encap/qt-1.40/lib -L/usr/X11R6/lib -o t4 main.o -lqt
> -lX11 
> main.o: In function `MyWidget type_info function':
> /opt/local/encap/qt-1.40/tutorial/t4/main.cpp(.rodata+0x24): undefined
> reference to `QWidget type_info node'
> /opt/local/encap/qt-1.40/tutorial/t4/main.cpp(.gnu.linkonce.t.__tf8MyWidget+0xd):
> undefined reference to `QWidget type_info function'
> collect2: ld returned 1 exit status
> 
> (See attached code)
> 
> The difference between tutorial 4 and tutorials 3,2,1 is 4 is the first
> time a Qt class is subclassed. The original source did not have a
> destructor, but I added one and the error message is almost the same
> (still complaining about type_info).
> 
> I searched using the egcs search engine for "type_info" and didn't come up
> with anything.
> 
> I get the same link-time error when building other applications as well.
> 
> Please let me know if there is any more information you would like.
> 
> Thanks,
>   Scott Powers
> -- 
> O-    Scott W. Powers    <*>| "What is one of the great leaders of the
>      Software Engineer      |  Minbari doing here playing ambassador?"
>   Raindrop Geomagic, Inc.   |   -- Soul Hunter #1 (to Delenn), "SH"
>  www.geomagic.com/~spowers  | 

Content-Description: Tutorial 3 (Compiles and Links Fine)
> /****************************************************************
> **
> ** Qt tutorial 3
> **
> ****************************************************************/
> 
> #include <qapplication.h>
> #include <qpushbutton.h>
> #include <qfont.h>
> 
> 
> int main( int argc, char **argv )
> {
>     QApplication a( argc, argv );
> 
>     QWidget w;
>     w.resize( 200, 120 );
> 
>     QPushButton quit( "Quit", &w );
>     quit.move( 62, 40 );
>     quit.resize( 75, 30 );
>     quit.setFont( QFont( "Times", 18, QFont::Bold ) );
> 
>     QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
> 
>     a.setMainWidget( &w );
>     w.show();
>     return a.exec();
> }

Content-Description: Tutorial 4 -- Compiles, but does not link
> /****************************************************************
> **
> ** Qt tutorial 4
> **
> ****************************************************************/
> 
> #include <qapplication.h>
> #include <qpushbutton.h>
> #include <qfont.h>
> 
> 
> class MyWidget : public QWidget
> {
> public:
>     MyWidget( QWidget *parent=0, const char *name=0 );
> };
> 
> 
> MyWidget::MyWidget( QWidget *parent, const char *name )
>         : QWidget( parent, name )
> {
>     setMinimumSize( 200, 120 );
>     setMaximumSize( 200, 120 );
> 
>     QPushButton *quit = new QPushButton( "Quit", this, "quit" );
>     quit->setGeometry( 62, 40, 75, 30 );
>     quit->setFont( QFont( "Times", 18, QFont::Bold ) );
> 
>     connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
> }
> 
> 
> int main( int argc, char **argv )
> {
>     QApplication a( argc, argv );
> 
>     MyWidget w;
>     w.setGeometry( 100, 100, 200, 120 );
>     a.setMainWidget( &w );
>     w.show();
>     return a.exec();
> }


-- 
O-    Scott W. Powers    <*>| "Then you're ruling out sabotage." 'I
     Software Engineer      |  *never* rule out sabotage.'
  Raindrop Geomagic, Inc.   |   -- Sinclair and Garibaldi, "Survivors"
 www.geomagic.com/~spowers  | 



More information about the Gcc-bugs mailing list