PDA

View Full Version : Undefined references while building test app against Qt452-static



Meastaway
19th November 2009, 19:02
Hi everyone,

I only very recently got into Qt, and haven't had any problems until encountering the following.

To start: I am using Qt452, opensource version. It was configured with (from config.status):

configure -prefix /vend/qtlgpl/qt452-e4-static-gcc402 -I/usr/kerberos/include/ -static -stl -release -qt-gif -qt-libpng -qt-libjpeg -qt-libtiff -qt-zlib -glib -fontconfig -xmlpatterns -platform linux-g++-64 -confirm-license

Now, the problem. As part of a test for this install and configuration of Qt, I am trying to build a relatively simple program (not of my own creation). My build against the shared configuration of Qt452 worked correctly.

When I try to build against the static configuration, however, I run into thousands of undefined reference errors. The output of my make is attached and compressed, it's too large to consider putting into this post.

I was able to fix about 50 of them by including the -qt-zlib option and reconfiguring -qt. I also tried including the -xmlpatterns and -glib arguments to the configuration (as suggested by various google/bing searches I performed on the various undefined references), but this did not solve anything.

Another facet: The Makefile for this application was not created by qmake, rather it was created by hand by the person who wrote the code.

Right now after all the reading I've done I have it narrowed down to two potential sources of error:
First, and probably most likely, I'm missing a module (or several) that is required for the successful building of this code. It looks like the biggest areas of undefined references are glib, font stuff, QPersistentModel, and QAbstractItemModel.

The second source of error lies in the Makefile (I have attached it for completeness' sake), where I suppose the error would be that the correct libraries aren't being linked in.

I know there are a lot of lines in the make.out.txt file, but there is heavy repetition so it's not impossible to read through.

I've been trying to figure out the source of this error for a little over 3 weeks now, and it's starting to drive me insane, especially as it is likely to be a real simple mistake. If someone could help even just point me in the correct direction (whether its likely to be a problem with Qt or my system) I'd be extremely gratified. Thank you so much in advance, I'm deeply appreciative.

It should also probably be noted that this static configuration of Qt has been used to sucessfully build other projects, at the moment it is just this single project giving me difficulties.

Thanks!