[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building a qt library

From: Craig Sanders
Subject: Re: building a qt library
Date: Sun, 30 Nov 2008 13:35:44 +1100

Lorenzo Bettini <address@hidden> wrote:> 
> Craig Sanders wrote:
>> Greetings Lorenzo.
>> I have used the GNU Autotools in the past to build some simple
>> projects which made use of the Qt Library. I prefer to use the GNU
>> Autotools as I find them much more flexible and much more powerful than
>> qmake.
>> As I recall, there are 2 key steps that need to be performed when
>> using the GNU Autotools with Qt.
>> Step 1, You will need to get hold of an Autoconf macro which will
>> detect if and if so, where you have a Qt Library installed on your
>> system. If this macro detects that you have a Qt Library installed on
>> your system, then it will generate some appropriate settings for you.
>> Step 2, You will also need to instruct the Autotools how to invoke
>> the Qt moc (Meta Object Compiler) on your relevant source code files.
>> To accomplish the first step, you should be able to find an
>> appropriate Autoconf macro here ;
>> Personally, I use the macro bnv_have_qt - information about which can
>> be found here ;
>> I then call this macro from my file as is illustrated
>> below.
> <SNIP>
> Hi Craig
> thanks a lot for your answer!
> I've just tried this macro on a brand new empty project...  I'm testing
> it under windows with cygwin, and it seems to fail: I run configure like
> this
> ./configure --with-Qt-lib-dir=/usr/lib/qt3/lib/
> --with-Qt-include-dir=/usr/include/qt3/
> --with-Qt-bin-dir=/usr/lib/qt3/bin/ --with-Qt-lib=qt
> and I get
> checking for Qt... yes:
>      QT_CXXFLAGS=-I/usr/include/qt3/
>      QT_DIR=
>      QT_LIBS=-L/usr/lib/qt3/lib/ -lqt  -lSM -lICE  -lX11 -lXext -lXmu
> -lXt -lXi
>      QT_UIC=/usr/lib/qt3/bin//uic
>      QT_MOC=/usr/lib/qt3/bin//moc
>      QT_LRELEASE=/usr/lib/qt3/bin//lrelease
>      QT_LUPDATE=/usr/lib/qt3/bin//lupdate
> checking correct functioning of Qt installation... failure
> configure: error: Failed to find matching components of a complete
>                    Qt installation. Try using more options,
>                    see ./configure --help.
> Actually, the link phase of the test example fails...  have you even
> tried your project under cygwin?
> cheers
>       Lorenzo

Hello again Lorenzo.

I haven't tried configuring and building my Qt project using Cygwin under 
Windows. Rather, I have only configured and built it under Linux Fedora Core 2 
and using the default Qt installation (version 3.3) that is distributed with it.

If I invoke the following switch ;


when I run the configure script, then my project successfully configures and 
compiles. This has always worked for me, so I haven't bothered to try using any 
of the other Qt related configure script switches, i.e. --with-Qt-lib-dir, etc.

You could maybe try using this approach, and if you find that it doesn't work 
for you then you could perhaps send an e-mail to the author of the bnv_have_qt 
macro. I don't use Windows for software development, so I'm not sure what you 
would need to do in order to get the bnv_have_qt macro to find your Qt 
installation using just this one configure script switch. Sorry I can't be of 
more any more help.

Good luck with it.

- Craig Sanders

reply via email to

[Prev in Thread] Current Thread [Next in Thread]