[Scons-users] QtDir not found
Philipp Kraus
philipp.kraus at flashpixx.de
Thu Apr 4 04:36:34 EDT 2013
Hi,
I try to use Qt 5.0.1 with Scons 2.3.0 & MinGW on Windows (test installation):
I create the env object like
env = Environment( tools=["mingw", "qt"] )
env.AppendUnique(CXXFLAGS = ["-O2"], )
env.Replace(QTDIR = os.path.join("..", "Qt", "5.0.1", "mingw47_32"))
The dump of env shows for the Qt part
'QTDIR': '..\\Qt\\5.0.1\\mingw47_32',
'QT_AUTOSCAN': 1,
'QT_BINPATH': '$QTDIR\\bin',
'QT_CPPPATH': '$QTDIR\\include',
'QT_LIB': 'qt',
'QT_LIBPATH': '$QTDIR\\lib',
'QT_MOC': '$QT_BINPATH\\moc',
'QT_MOCCXXPREFIX': '',
'QT_MOCCXXSUFFIX': '.moc',
'QT_MOCFROMCXXCOM': [ ['$QT_MOC', '$QT_MOCFROMCXXFLAGS', '-o', '${TARGETS[0]}' , '$SOURCE'], <SCons.Action.FunctionAction object at 0x01CFB1D0>],
'QT_MOCFROMCXXFLAGS': ['-i'],
'QT_MOCFROMHCOM': '$QT_MOC $QT_MOCFROMHFLAGS -o ${TARGETS[0]} $SOURCE',
'QT_MOCFROMHFLAGS': [],
'QT_MOCHPREFIX': 'moc_',
'QT_MOCHSUFFIX': '$CXXFILESUFFIX',
'QT_UIC': '$QT_BINPATH\\uic',
'QT_UICCOM': [ ['$QT_UIC', '$QT_UICDECLFLAGS', '-o', '${TARGETS[0]}', '$SOURCE'], ['$QT_UIC', '$QT_UICIMPLFLAGS', '-impl', '${TARGETS[0].file}', '-o', '${TARGETS[1]}', '$SOURCE'], ['$QT_MOC', '$QT_MOCFROMHFLAGS', '-o', '${TARGETS[2]}', '${TARGETS[0]}']],
'QT_UICDECLFLAGS': [],
'QT_UICDECLPREFIX': '',
'QT_UICDECLSUFFIX': '.h',
'QT_UICIMPLFLAGS': [],
'QT_UICIMPLPREFIX': 'uic_',
'QT_UICIMPLSUFFIX': '$CXXFILESUFFIX',
'QT_UISUFFIX': '.ui',
seems to be fine. but creates the warning:
scons: warning: Could not detect qt, using empty QTDIR
but moc etc runs without errors, but on this default settings, Scons try to link always to the "qt" library, but on Qt 5 this does not exist.
I set the linker to
env.Replace(QT_LIB = ["Qt5Widgets", "Qt5Gui", "Qt5Core"])
All problems are only "defective appearance"
Thanks to your great work
Phil
More information about the Scons-users
mailing list