PDA

View Full Version : Qwt with two Qt versions



Induriel
24th June 2015, 10:33
Hi,

I try to get qwt6.1.2 running with Qt5.4.2. On my computer is additionally Qt4.8.4 installed.

Qwt compiled, I linked it against my own app - and this one does not start. I get these messages:

'SpitlightGUI.exe': Loaded 'D:\project\qwt-6.1.2\lib\qwtd.dll', Symbols loaded.
'SpitlightGUI.exe': Loaded 'C:\Qt\4.8.4\bin\QtSvgd4.dll', Symbols loaded.
'SpitlightGUI.exe': Loaded 'C:\Qt\4.8.4\bin\QtGuid4.dll', Symbols loaded.


Obviously qwt is linked against Qt4.8.4. And this is where I'm stuck.

I compiled qwt6.1.2 with the Qt5 cmdline, using the exact path to Qt5-qmake. The Makefile states it was generated by qmake 3.0, Qt 5.4.2. , but my system still prefers to use Qt4. There're two different pathes in src.pro: greaterThan(QT_MAJOR_VERSION, 4) {} else {}

So I guess the QT_MAJOR_VERSION on my system is still 4. If I remove my Qt4 installation (by simply renaming the path), recall qmake, nmake complains
NMAKE : fatal error U1073: don't know how to make 'c:\Qt\4.8.4\mkspecs\default\qmake.conf'

I have no idea where QT_MAJOR_VERSION comes from and how I can set it to 5 and make nmake to use the Qt5 installation.

Can anybody please help me here?

Thanks,
Carsten

Induriel
26th June 2015, 08:10
Solved by using 'nmake distclean'. There must have been some old Makefile pointing to Qt4.