[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 2.0.0.18 (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 ;
http://autoconf-archive.cryp.to/macros-by-category.html
Personally, I use the macro bnv_have_qt - information about which can be found
here ;
http://autoconf-archive.cryp.to/bnv_have_qt.html
I then call this macro from my configure.ac 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
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net