PDA

View Full Version : undefined reference errors durring make



Override
12-27-2001, 12:16 PM
I have finnaly gotten seq to configure, but now I am having problems runing make.

/apps/showeq/linux/src/statlist.cpp:233: undefined reference to `QString::QString(char const*)'
statlist.o: In function `EQStatList::stamChanged(int, int, int, int, int, int)':
/apps/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/apps/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'

It goes on like this for quite a ways. This is where it stops.

/apps/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/apps/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/apps/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/apps/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
collect2: ld returned 1 exit status
make[2]: *** [showeq.C] Error 1
make[2]: Leaving directory `/apps/showeq/linux/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/apps/showeq/linux'
make: *** [all-recursive-am] Error 2

What else could I be doing wrong at this point?

Tristan469
12-27-2001, 12:53 PM
I'm getting the same error on my Redhat 7.1 box.

gdbmconv.o: In function `GDBMIterator::GetFirstKey(GDBMConvenience *, QString, Datum &)':
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
gdbmconv.o: In function `GDBMIterator::GetFirstKey(QString, Datum &)':
/root/showeq/src/gdbmconv.cpp:298: undefined reference to `QString::QString(char const *)'
/root/showeq/src/gdbmconv.cpp:298: undefined reference to `QString::operator+=(QString const &)'
gdbmconv.o: In function `GDBMIterator::GetFirstKey(QString, Datum &)':
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:511: undefined reference to `QString::latin1(void) const'
/usr/local/qt/include/qstring.h:511: undefined reference to `QString::latin1(void) const'
gdbmconv.o: In function `GDBMIterator::GetFirstKey(QString, Datum &)':
/root/showeq/src/gdbmconv.cpp:310: undefined reference to `QString::QString(QString const &)'
gdbmconv.o: In function `GDBMIterator::GetFirstKey(QString, Datum &)':
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
/usr/local/qt/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:651: undefined reference to `QString::shared_null'
/usr/local/qt/include/qstring.h:652: undefined reference to `QStringData::deleteSelf(void)'
collect2: ld returned 1 exit status
make[2]: *** [showeq] Error 1
make[2]: Leaving directory `/root/showeq/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/showeq'
make: *** [all-recursive-am] Error 2


Any Ideas?
Thansk

Override
12-27-2001, 08:17 PM
I had to recompile QT. If you did a compile and didn't install a package this might help. You can do Make clean. Once you do that make sure you have used those two export command that update your gcc pointers.
export CC=gcc3
export CXX=g++3
In my case the commands where actually gcc-3.0.1 and g++-3.0.1
Now look in zaphod's guide and make sure you download his patch for qt 2.3.2 and run the commands exactly as he shows you in his post. Here is where the prob for me is. The qt patch simply assumes the command for gcc3 is just gcc3 and g++3 instead of going through the pointers. So i went into my /usr/bin and made links to the commands (this may be different for you check the filename of the commands)
cd /usr/bin
ln -symbolic gcc-3.0.1 gcc3
ln -symbolic g++-3.0.1 g++3
Now i went back into my qt dir and ran
./configure -thread
make
it went solid.. no problems and compiled in gcc3
after that i was able to configure and compile showeq.
whew! all that trouble
So to explain what was going wrong in my case: I basically have two versions of gcc loaded and QT was compiling in 2.96. So then, when i updated the pointers and compiled seq then it borked during make.
Hope this helps you tristan

Tristan469
12-28-2001, 07:25 AM
Thanks Override.. Unfortunatly I had already made those symbolic links and on my Redhat box the were gcc3 and g++3.. However, my Mandrake box had them as gcc-3.0.1 and g++-3.0.1 so I'll keep your suggestions in mind while building seq on mandrake..

Ohh well, I started all over again with my RH box so we'll see what happens... Compiling the QT stuff now. I'll let you know how it goes in ooooooo, say about 6 hours... /sigh...

Cheers!