trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: September 2010

Re: [trinity-devel] tqt.h confusion

From: "Timothy Pearson" <kb9vqf@...>
Date: Thu, 2 Sep 2010 14:32:39 -0500
> On Thursday 02 September 2010 20:29:18 Timothy Pearson wrote:
>> > Hello,
>> >
>> > I found that tqt.h is modified only at install stage.
>>
>> That is correct, however the automake/autoconf system defines USE_QT3 or
>> USE_QT4 based on the Qt version specified in admin/acinclude.m4.in.
>>
>> The new CMake-based build system will also need to define USE_QT3 or
>> USE_QT4 when it builds any of the Trinity modules.  This is to allow
>> conditional code within Trinity so as to maintain build compatibility
>> with
>> both versions of Qt.
>
> I predicted this, so i renamed tqt.h to tqt.h.in and I generate tqt.h via
> cmake script.

Works for me.

>
>> > If I define USE_QT3
>> > before compilation, the compilation stop with this error:
>> >
>> > tqinputcontext.h:32:27: error: qinputcontext.h: No such file or
>> directory
>> >
>> > This is intended behaviour? If yes, for what purpose is designed in
>> this
>> > way?
>>
>> No, that is not the intended behaviour.  Do you have the qinputcontext.h
>> header file present on your system?  The old autoconf/automake system
>> actively searched for the Qt headers and added the that directory to the
>> include search path in the gcc flags.
>
> qinputcontext.h seems QT4 file, I have it only in
> qtinterface/qt4/Qt/qinputcontext.h. I must to include this directory in
> include paths, even for QT3 build?

It is present in my version of Qt3; see this page:
http://packages.ubuntu.com/lucid/i386/libqt3-headers/filelist

I am not sure why it does not exist on your system.  If it is not a
generic file present on all Qt installations then you may have to let
CMake search for it and conditionally remove the reference to it based on
the CMake search results.

>
>> Also please be aware that for all modules that rely on TQt, you will
>> need
>> to detect the presence of the TQt headers, and pass the "-include tqt.h"
>
> I created a file named TQt.pc, for detecting is via pkg-config
>
>> flag to gcc.  You should also add the TQt header directory to gcc's
>> include search path.
>
> Good to know.
>
> --
> Serghei
>