I'm trying to set up a Boost.Build .jamroot file for compiling a Qt 4.8 project, but it seems to be ignoring the.ui files and the .cpp files that should be moc:ed. I tried poking around inside qt4.jam, adding some more ECHO:s, but I'm not sure where to look.
It seems that the run method of uic-generator doesn't get called (init does), for example, but I think it should be.
My jamroot file looks something like this:
import qt4 ;
if ! [ qt4.initialized ]
{
ECHO "oh nooo" ;
}
import cast ;
exe application :
# For example
[ cast _ moccable-cpp : ./src/something.cpp ]
[ glob-tree *.ui : .svn ]
;
The only output I get is:
>bjam
warn: Unable to construct ./application
...found 1 target...
If I run bjam --debug-configuration, qt4.jam prints out all the correct paths for my Qt installation.
What's up? Maybe it's incompatible with Qt 4.8? Or am I just using it wrong? Although the code is almost verbatim taken from the files under examples/qt.
How can I use it? Thanks for any help.
Edit: Using gcc 4.7 with the MinGW distro 9.0 from http://nuwen.net/mingw.html, and the Boost.Build that comes with Boost 1.49.0.
replace ./src/something.cpp to ./src/something.hpp, i.e.:
[ cast _ moccable-cpp : ./src/something.hpp ]
bjam 's qt-examples tend to misunderstanding: main.cpp module mix up source and header files.
Let's remember moc process header files usually (files with Q_OBJECT 's class declaration(s): in most cases source files doesn't contain its)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With