October 12, 2010

drjakir drjakir
Lab Rat
1 posts

QT compiler flags/defines


I am trying to integrate Qt into a build environment where QMake/CMake is currently not an option, hence I need to understand every detail of the build process to replicate it in our own Makefiles.

What are the purpose of the DEFINES (e.g. -DUNICODE, -DWIN32, -DQT_DLL, -DQT_WEBKIT_LIB, etc) ? Are they necessary for building projects based on Qt (not QT itself) – and if, where do I find a complete list of relevant flags? Can possibly missing flags cause various obscure failures at runtime?

I have tried removing them from the autogenerated makefiles in various example projects, which does not seem to change anything.

1 reply

October 14, 2010

danilocesar danilocesar
Lab Rat
150 posts

I believe they’re important…

I did a a very fast lookup for those string:

UNICODE are being used in 3rdparty/wintab/wintab.h
QT_DLL is being used in global/qglobal.h

New you need to track down what they’re doing ;)

Anyway, whatever you have to do, replicate qmake’s work probably is not a good idea.
Post here your environment issues and maybe we can help you in a proper way.


Danilo Cesar Lemes de Paula
Software Engineer

  ‹‹ Qt Creator 2.0.1 Multi Qt Versions Support Issue?      class QApplication has no member named qwsSetDecoration ››

You must log in to post a reply. Not a member yet? Register here!