PDA

View Full Version : Problems with QT in configure



someshaman
09-09-2002, 10:53 AM
I installed SuSE 8.0, tried it with both the included QT 3 (I think 3.0.3), installed the QT 2.3.2 and it failed to compile.

Installed Redhat 7.3 on another system, tried it with the included QT 3.0.3, as that
failed, I downloaded QT 3.0.5 and compiled it with -thread. In all instances I get these errors (or very simular):


/tmp/ccJzz08S.o: In function `main':
/tmp/ccJzz08S.o(.text+0x8a): undefined reference to `QMutex::QMutex[in-charge](bool)'
/tmp/ccJzz08S.o(.text+0x99): undefined reference to `QMutex::~QMutex [in-charge]()'
/tmp/ccJzz08S.o: In function `QString::QString[in-charge]()':
/tmp/ccJzz08S.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x7): undefined reference to `QString::shared_null'
/tmp/ccJzz08S.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x10): undefined reference to `QString::shared_null'
/tmp/ccJzz08S.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x18): undefined reference to `QString::makeSharedNull()'
collect2: ld returned 1 exit status


Any idea what I might be missing ? A lib, package ?

Cryonic
09-09-2002, 11:03 AM
Go read the FAQ or the install.newbies file.

someshaman
09-09-2002, 11:23 AM
Lets see from the newbie file:

13. Type the command: rpm -Uvh qt-2.0.1-5.i386.rpm
14. Type the command: rpm -Uvh qt-devel-2.0.1-5.i386.rpm

Hmm, if I didn't install those (or the newer versions) configure would fail on locating the include files, not on solving link references.

As said above, I downloaded QT 3.0.5 compiled it. That includes all necessary libs and include files to match the instructions above.

And I did compile it with gcc3/g++3 as in the FAQ said. Tried it with "configure" and "configure -thread".

2.17 How do I compile QT-2.3.x or QT-3.0.x with gcc3?
This is actually not very hard and merely involves editing a file (a different one for each of the two main version). You will need to change all references to "gcc" and "g++" to your version of gcc3. For QT-2.3.x the file is "configs/linux-g++-shared" and for QT-3.0.x it is "mkspecs/linux-g++/qmake.conf". Then just run the ./configure found above and finish up with a make.

Mr. Suspicious
09-09-2002, 11:38 AM
Lets see from the newbie file:

13. Type the command: rpm -Uvh qt-2.0.1-5.i386.rpm
14. Type the command: rpm -Uvh qt-devel-2.0.1-5.i386.rpm


That's not from the INSTALL.newbies file. Dunno what you are reading, but certainly not the current INSTALL.newbies file.

someshaman
09-09-2002, 01:38 PM
Thats from the old newbie file on the sourceforge project page. Not that different from the INSTALL.newbie file.

So let me reiterate:

I have gcc version 3.1 20020604 (Red Hat Linux 7.3 3.1-5)

I have qt 3.0.5, with mkspecs/linux-g++/qmake.conf changed to use gcc3 and g++3

I ran configure -thread.

I am still getting the unresolved symbols at link time. I have used showeq for a long time, but I had to reinstall my machine it was on (disk died).

Dedpoet
09-09-2002, 02:34 PM
Did you edit the file that install.newbies says to edit? Did you export your CC and CXX variables? It really sounds from your errors like you didn't compile with gcc3. I know you said you did, but the QMutex errors say you didn't.

The FAQ recommends RH 7.2 over 7.3 because it works right out of the box as long as you install the right packages listed in the walkthru. With 7.3, it gets a little tougher. Triple check that you edited the correct configuration file and exported the proper variables.

I know RH 7.3 and Qt 3.0.5 are the latest, but the FAQ specifically says to use RH 7.2 and Qt 2.3.2 because they work...

someshaman
09-09-2002, 02:42 PM
Yes, I set the CC enviroment vairables. QT is compiled with gcc3/g++3, showeq configure finds gcc3/g++3 and uses it from the config.log.

I might indeed just grab 7.2 when I find it here. Usual use FreeBSD on all my unix machines, but thread support on there seems to have issues with things like showeq. I can get it to work, but the cpu load is much higher.

*edit* compiling QT 2.3.2 right now, following exactly the INSTALL.newbie from the cvs showeq checkout. Compile still going, so we will see what it says. And the compile is using gcc3/g++3.

*edit2* QT 2.3.2 just finished compiling, this time configure works. Going to check later again on QT 3.0.5