Search code examples
c++qtqt5pcreqregularexpression

Error while building Qt 5.3


When I want to build Qt 5.3 on Windows, it give me an error:

mingw32-make[4]: Entering directory 'c:/qt-5.3.0/qtbase/src/corelib'
g++ -c -include .pch\release\qt_pch.h -pipe -fno-keep-inline-dllexport -O2 -std=
gnu++0x -fexceptions -mthreads -frtti -Wall -Wextra -DUNICODE -DQT_NO_USING_NAME
SPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -DQT_ASCII_
CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -
DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_USE_ICU -DQT_COR
E_LIB -DQT_NO_DEBUG -I. -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\incl
ude\QtCore\5.3.0" -I"..\..\include\QtCore\5.3.0\QtCore" -I"tmp" -I"global" -I"..
\3rdparty\harfbuzz\src" -I"..\3rdparty\md5" -I"..\3rdparty\md4" -I"..\3rdparty\s
ha3" -I".moc\release" -I"C:\JPEGLIB\jpeg-build\include" -I"C:\qt-5.3.0\qtwebkit\
Source\WebCore\plugins" -I"C:\gnuwin32\include" -I"C:\icu\icu\dist\include" -I".
.\3rdparty\pcre" -I"..\..\mkspecs\win32-g++" -o .obj\release\qregularexpression.
o tools\qregularexpression.cpp
tools\qregularexpression.cpp: In function 'int convertToPcreOptions(QRegularExpr
ession::PatternOptions)':
tools\qregularexpression.cpp:778:20: error: 'PCRE_UCP' was not declared in this
scope
         options |= PCRE_UCP;
                    ^
tools\qregularexpression.cpp: At global scope:
tools\qregularexpression.cpp:831:5: error: 'pcre16' does not name a type
     pcre16 *compiledPattern;
     ^

And there is lot of errors related to PCRE after that.

I found that the PCRE library is related to Perl, but Perl is correctly installed on my PC.

Do you have a solution?


Solution

  • You must have a broken installation. Strive for a clean new installation.

    This works fine with the pcre.h installed. I would suggest to reinstall your setup because even though if you replace your stray pcre.h file, other things may as well just blow up at some point.