Hacking:Problems and solutions

From Seamly
Revision as of 17:25, 13 June 2016 by Dismine (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Build[edit | edit source]

MSVS error: C2065: 'not': undeclared identifier[edit | edit source]

Problem: Building with MSVS fail with error C2065: 'not': undeclared identifier.
Cause: By default MSVS doesn't support C++ alternative tokens.
Solution: MSVS require the header to be included in order to use these identifiers.

#ifdef Q_CC_MSVC
    #include <ciso646>
#endif /* Q_CC_MSVC */

Rebuilding stuck on updating translations stage[edit | edit source]

Problem: Rebuilding is slow because rebuilding translations.
Cause: Usually qmake runs only one time. And in this time we really need to call rebuild all translations.
Solution: Run qmake second time. qmake will find that localization files already exist and skip this call in a makefile.

Error: definition of macro 'LATEST_TAG_DISTANCE' differs between the precompiled header[edit | edit source]

Problem: Build error: definition of macro 'LATEST_TAG_DISTANCE' differs between the precompiled header ('xxxx') and the command line ('xxxx').
Cause: The macro 'LATEST_TAG_DISTANCE' shows distance between the last release and current commit. This information was changed since last creating precompiled headers. Most probable you made new commit or switched to new.
Solution: You have two options. Use for building Debug mode. In this mode you don't need to worry about the macro. Or call full rebuild each time such an error occur.