Solved Error to build with Static Qt 5.6.3 on Mac
-
Download the source code of qt5.6.3
http://download.qt.io/archive/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz
Compile error, command as follows
./configure -static -debug-and-release -nomake examples -nomake tests -prefix ~/Qt/5.6.3_static_osx -qt-sql-sqlite -plugin-sql-sqlite -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre -opensource -confirm-license -opengl -qt-freetype
Make error, modify the
qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
file before executionPerform
make
is not an error, butmake install
errorHow do I compile correctly?
-
Hi,
What version of macOS and Xcode are you using ?
Why are you trying to build such an outdated version of Qt ? -
@SGaist hello,Sorry for the late reply。
-
The Mac version is MACOSX Sierra 10.12.6
-
Xcode is version 9.2
-
Because of the unified version of Mac and Windows, 5.6.3 should be used for Windows compatible with xp
-
-
@SGaist error is as follows
/Users/shandikeji/Desktop/Qt/QtStatic/5.6.3/src/qtconnectivity/src/bluetooth/osx/osxbtledeviceinquiry.mm:205:33: error: cannot initialize a variable of type 'const CBCentralManagerState' with an rvalue of type 'CBManagerState'
-
Then maybe a silly question but are you using the Qt Connectivity module for your application ?
If not then don't build it.On a side note, why are you doing a custom build of Qt ?
-
@SGaist you mean to remove the superfluous build like this
./configure -static -debug-and-release -nomake examples -nomake tests -prefix ~/Qt/qt5.6.3/5.6.3/clang_64/ -opensource -confirm-license
I'm sorry that I didn't quite understand what you said about a custom build of Qt
-
This post is deleted! -
After making the changes, the compilation succeeded. The changes are as follows
- qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
- qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
- qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
- qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-
Good !
Since you have it building now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
-
@SGaist Thank you very much for the tip