PDA

View Full Version : Linking to wrong version of Qt in Cmake



Matt Smith
9th December 2007, 10:29
I posted this to the CMake mailing list, but haven't had a satisfactory answer.

I'm using Linux Mint 4.0 and have just downloaded and compiled the latest version of Qt (4.3.3). I installed it sandboxed (/usr/local/Trolltech etc), as I already have the Ubuntu version of Qt 4 installed in /usr/lib for building Debian packages of QTM.

I've tried actually building with the new version, however, and the linker refuses to use it. Even though the location of qmake is in the path and CMake detects version 4.3.3, it links to the Ubuntu version. This is a first-link issue, not the relink-on-install problem. Does anyone know how to fix it?

wysota
9th December 2007, 10:39
Did you set LD_LIBRARY_PATH to point to the proper library? Did you make sure the proper qmake is before the other in the path? Also I think you can point cmake the location of your Qt installation, although I'm not sure as I don't use cmake myself.