[Interest] Understanding Qt Macros

Alfredo Palhares masterkorp at masterkorp.net
Sat Jan 3 03:13:41 CET 2015


Hello,

First of all, let me say I am pretty new to this Qt and C++ thing.

I recently adopted a Qt/C++ Linux desktop project. And I am currently
looking on qmake builds the project itself.

/usr/lib/qt4/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. configdata.h -o
moc_configdata.cpp

This is the moc that generated the C++ file.

But qmake calls is it with all those macro definitions:
- QT_GUI_LIB
- QT_CORE_LIB
- QT_SHARED

What do these macros do ? I've tried to google the terms but no luck.
Also how does qmake know when to call them ? Based on what terms ?

Thanks in advance.

--
Regards,
Alfredo Palhares



More information about the Interest mailing list