Boost logo

Boost-Build :

From: Felix E. Klee (felix.klee.jamboost_at_[hidden])
Date: 2003-01-17 17:52:17

On Thursday 16 January 2003 02:09 pm, Vladimir Prus wrote:
> I've just added preliminary QT support to CVS. I'm now able to
> cd to examples-v2/qt, run "bjam" there, and obtain an working
> QT application.
> Felix, can you check it out, first with gcc, and then with Kylix?

Phew, I finally found the time for testing. However, a gcc based build doesn't
yet work for me because the linker cannot find the QT library:

[...]/boost/tools/build/examples-v2/qt> bjam -a -d2
g++ -g -lqt -o bin/gcc/debug/main-target-t7/t7
bin/gcc/debug/main-target-t7/main.o bin/gcc/debug/main-target-t7/lcdrange.o
bin/gcc/debug/main-target-t7/moc_lcdrange.o -Wl,-Bdynamic -Wl,-Bstatic
-Wl,-Bdynamic -Wl,-Bstatic -Wl,-Bdynamic

cannot find -lqt
collect2: ld returned 1 exit status
...failed bin/gcc/debug/main-target-t7/t7...
...failed updating 1 target...
...updated 4 targets...

You should add "-L$(QTDIR)/lib" to the gcc command line when qt compilation is
turned on. I haven't yet tried it out with Kylix because it sure suffers from
the same problem (BTW, bc++ also understands the -L option).

I had a look at the Jamfile and it looks very good and seems to be very easy
to use. However, as several people, among them yourself, pointed out in the
thread "Adding QT support to Boost Build V2" it really isn't a good idea to
introduce that ".qpp" extension. As I already explained to Jürgen, the moc
can be seen as a tool in the spirit of Doxygen that processes regular C++
files and extracts information from them. So leaving the header file
extension at ".h" (or ".hpp", maybe) actually does make more sense from that
point of view. After all, we don't want to use a different extension for each
header file that is to be processed by a certain tool.

> However, this support has one *horrible* kluge. It directly adds "-lqt" to
> the linker command line. It is probably OK here, but in general it bring
> the following two questions:

Sorry, I can't comment on these. I just don't know enough about the Jam


To contact me personally don't reply but send email to 
felix DOT klee AT inka DOT de

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at