[Scons-users] Trouble building a qt based project.

Dirk Bächle tshortik at gmx.de
Mon Oct 7 13:47:52 EDT 2013


Hi Matias,

On 07.10.2013 17:31, Matias Iturburu wrote:

> I'm trying to make scons build me a project using the great qt4 tool

> (https://bitbucket.org/dirkbaechle/scons_qt4/

> <https://bitbucket.org/dirkbaechle/scons_qt4/src>).

>

> [...]

> So, summing up:

>

> - How would be the proper way to set the evironment for the qt_tool?


it looks as if "pkg-config" can't be found in your system, or isn't
configured properly. Please run "scons" on the following simple SConstruct:

env = Environment(tools=['default','qt4'])
env.EnableQt4Modules(['QtCore','QtGui'])

print env.subst('$CPPPATH')



It should print the include paths for the Qt modules like
"/usr/include/qt4 /usr/include/qt4/QtCore /usr/include/qt4/QtGui". If
this doesn't happen, check that you have pkg-config (`which pkg-config`)
and that you have the "libqt4-dev" package installed.

> - How can I tell scons where my resources are so it solve the paths

> and I don't have to hardcode absolute paths on my .qrc's.


The "rcc" executable supports the "-root <path>" parameter, that you can
set via the $QT4_QRCFLAGS variable. Please check "rcc -?" for how this
option works exactly.


> - What is the proper setup for MOC to resolve my includes correctly?

>


The "automoc" feature assumes that your *.h files are next to the CPP
files. You can't change anything about this, but you could use the
explicit MOC builder named ExplicitMoc4() instead.

Hope this helps.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131007/f602516f/attachment.html


More information about the Scons-users mailing list