[Top][All Lists]

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

Re: building a qt library

From: Lorenzo Bettini
Subject: Re: building a qt library
Date: Sat, 29 Nov 2008 23:15:18 +0100
User-agent: Thunderbird (Windows/20081105)

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.

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_LIBS=-L/usr/lib/qt3/lib/ -lqt -lSM -lICE -lX11 -lXext -lXmu -lXt -lXi
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?


Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)

reply via email to

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