PDA

View Full Version : qmake and nmake (wrong path to Qt in makefile)



StarShaper
9th March 2012, 05:23
Hi,

I'm trying to build Qt with qmake and nmake (VS2010). It works, but I always have to correct the created paths of qmake. Qmake generates false paths, like


INCPATH = -I"c:\iwmake\build_vs2010_opensource_________________ PADDING_________________\include\QtCore"
LFLAGS = /LIBPATH:"c:\iwmake\build_vs2010_opensource_________________ PADDING_________________\lib"
IDC = c:\iwmake\build_vs2010_opensource_________________ PADDING_________________\bin\idc.exe

It should be


INCPATH = -I"c:\Qt\4.8.0\include\QtCore"

or


INCPATH = -I"$(QTDIR)\include\QtCore"

How can I fix this? I already took a look at http://qt-project.org/doc/qt-4.8/qmake-platform-notes.html but it didn't help. I was able to fix some issues with QMAKE_LIBDIR_QT and QMAKE_LIBDIR in the *.pro file. But the INCPATH is still messy.

Added after 55 minutes:

SOLVED!

Qt has to be configured with configure.exe. In Qt 4.8.0 Perl is needed for some tasks. One of the solutions to build without Perl is to delete (or rename or move) all the synqt.* files in Qt's /bin directory. This worked for me.

Configure.exe will set all Vars, like $$[QT_INSTALL_HEADERS] and $$[QT_INSTALL_LIBS] in the qmake.conf file.

Qmake now works fine. :)