0
我試圖運行使用waf
的項目,它使用boost
庫。爲了克服problem我需要將-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
參數傳遞給MOC
。我試圖在wscript
這樣做,因爲waf:將編譯器標誌傳遞給qt的moc
bld(features ='cxx',
source ='GSTEngine.cpp',
target = 'GSTEngine.o',
includes = qtinc+gstinc+taginc,use=['BOOST'],
uselib = qtlibs,
cxxflags = ['-DQT_NO_KEYWORDS','-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED'])
但它失敗了。如何使用waf
將參數傳遞給MOC
?
你確定這些需要傳遞給moc嗎?它們看起來像泛型定義,應該通過「bld(...,defined = ['QT_NO_KEYWORDS','BOOST_TT_HAS_OPERATOR_HPP_INCLUDED',...)」來定義,如http://docs.waf.googlecode.com /git/book_16/single.html第9.1.2節 – drahnr 2012-07-10 17:20:12