要包含的qt调试文件的waf配置

时间:2012-05-23 09:15:43

标签: python qt wsh waf

我正在编写一个用于实现包含QDebug

的代码的wscript
#include <QDebug>

在配置qt的wscript中,我指定了这些行

def configure(conf): 
    conf.env.append_value('CXXFLAGS', ['-DWAF=1'])  
    conf.load('compiler_cxx qt4') 
    conf.check_cfg(package='gstreamer-0.10', args='--cflags --libs',        
            uselib_store='GSTREAMER')       

./waf configure的输出低于

vickey@tb:~/p2p$ ./waf configure
Setting top to                           : /home/vickey/tunebasket/p2p 
Setting out to                           : /home/vickey/tunebasket/p2p/build 
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for program qmake-qt4           : /usr/bin/qmake-qt4 
Checking for program qmake4              : not found 
Checking for program qmake               : /usr/local/Trolltech/Qt-4.8.0/bin/qmake 
Checking for program uic-qt3             : not found 
Checking for program uic3                : /usr/local/Trolltech/Qt-4.8.0/bin/uic3 
Checking for program uic-qt4             : /usr/bin/uic-qt4 
Checking for uic version                 : version 4.7.4 
Checking for program moc-qt4             : /usr/bin/moc-qt4 
Checking for program rcc                 : /usr/local/Trolltech/Qt-4.8.0/bin/rcc 
Checking for program lrelease-qt4        : /usr/bin/lrelease-qt4 
Checking for program lupdate-qt4         : /usr/bin/lupdate-qt4 
Found the Qt4 libraries in               : /usr/local/Trolltech/Qt-4.8.0/lib 
Checking for program pkg-config          : /usr/bin/pkg-config 
Checking for pkg-config version >= '0.1' : yes 
Checking for 'QtCore_debug'              : not found 
Checking for 'QtGui_debug'               : not found 
Checking for 'QtUiTools_debug'           : not found 
Checking for 'QtNetwork_debug'           : not found 
Checking for 'QtOpenGL_debug'            : not found 
Checking for 'QtSql_debug'               : not found 
Checking for 'QtSvg_debug'               : not found 
Checking for 'QtTest_debug'              : not found 
Checking for 'QtXml_debug'               : not found 
Checking for 'QtXmlPatterns_debug'       : not found 
Checking for 'QtWebKit_debug'            : not found 
Checking for 'Qt3Support_debug'          : not found 
Checking for 'QtHelp_debug'              : not found 
Checking for 'QtScript_debug'            : not found 
Checking for 'QtDeclarative_debug'       : not found 
Checking for 'QtCore'                    : yes 
Checking for 'QtGui'                     : yes 
Checking for 'QtUiTools'                 : yes 
Checking for 'QtNetwork'                 : yes 
Checking for 'QtOpenGL'                  : yes 
Checking for 'QtSql'                     : yes 
Checking for 'QtSvg'                     : yes 
Checking for 'QtTest'                    : yes 
Checking for 'QtXml'                     : yes 
Checking for 'QtXmlPatterns'             : yes 
Checking for 'QtWebKit'                  : yes 
Checking for 'Qt3Support'                : yes 
Checking for 'QtHelp'                    : yes 
Checking for 'QtScript'                  : yes 
Checking for 'QtDeclarative'             : yes 
Checking for 'gstreamer-0.10'            : yes 
'configure' finished successfully 0.758s
vickey@tb:~/p2p$ ./waf build
Waf: Entering directory `/home/vickey/tunebasket/p2p/build'
gstreamer includes ['/usr/include/glib-2.0', '/usr/lib/x86_64-linux-gnu/glib-2.0/include', '/usr/include/gstreamer-0.10', '/usr/include/libxml2']
[9/9] qxx: src/player/GSTEngine.cpp -> build/src/player/GSTEngine.cpp.1.o
../src/player/GSTEngine.cpp:7:18: fatal error: QDebug: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/vickey/tunebasket/p2p/build'
Build failed
 -> task in '' failed (exit status 1): 
    {task 16658960: qxx GSTEngine.cpp -> GSTEngine.cpp.1.o}
['/usr/bin/g++', '-DWAF=1', '-Wall', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/gstreamer-0.10', '-I/usr/include/libxml2', '-DHAVE_QTCORE=1', '-DHAVE_QTGUI=1', '-DHAVE_QTUITOOLS=1', '-DHAVE_QTNETWORK=1', '-DHAVE_QTOPENGL=1', '-DHAVE_QTSQL=1', '-DHAVE_QTSVG=1', '-DHAVE_QTTEST=1', '-DHAVE_QTXML=1', '-DHAVE_QTXMLPATTERNS=1', '-DHAVE_QTWEBKIT=1', '-DHAVE_QT3SUPPORT=1', '-DHAVE_QTHELP=1', '-DHAVE_QTSCRIPT=1', '-DHAVE_QTDECLARATIVE=1', '-DHAVE_GSTREAMER=1', '../src/player/GSTEngine.cpp', '-c', '-o', 'src/player/GSTEngine.cpp.1.o']

在配置步骤中,缺少一些qt调试文件。我以为使用DWAF = 1会解决它们。我做错了什么?

2 个答案:

答案 0 :(得分:0)

似乎你忘了在你的任务生成器声明中使用='QTCORE'(你没有在这里发布)。

DWAF = 1的东西来自一个例子,绝对没有。

答案 1 :(得分:0)

对于waf找到qtdebug文件,您需要相应的pc文件。我以前没有。一旦你拥有/制作了.pc文件并将它们放入正确的PKG_CONFIG_PATH中,waf会自动选择它们。