Unable to do static build from Qt source on MAC
-
Hi,
There's absolutely no requirements for a static build of Qt on macOS.
macdeployqt
was created to fix your application bundle with the various frameworks your application needs.As for your error, what version of MySQL are you using to build the plugin ?
-
wrote on 24 Nov 2018, 21:26 last edited by
Ok, good to know that about macdeployqt.
I still hope to get a static build going on Mac.I do not have any MySQL installed. Should I?
And if so, I use the -sql-driver flag for configure? -
Since the build is failing for the MySQL plugin, you likely have it somewhere
configure
found. -
wrote on 24 Nov 2018, 21:42 last edited by
i will check on that in a bit.
I have since borrowed another Mac and tried to compile same Qt version statically.
And I got different errors. Do you know what this one is about?
-- Errors --
orm/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../../../mkspecs/macx-clang -o .obj/debug/qcocoawindow.o qcocoawindow.mm
qcocoawindow.mm:407:59: error: use of undeclared identifier 'NSEventTypeMouseMoved'; did you mean 'kEventMouseMoved'?
const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
^~~~~~~~~~~~~~~~~~~~~
kEventMouseMoved
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/CarbonEvents.h:1721:3: note:
'kEventMouseMoved' declared here
kEventMouseMoved = 5
^
qcocoawindow.mm:408:62: error: use of undeclared identifier 'NSEventTypeMouseMoved'; did you mean 'kEventMouseMoved'?
const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
^~~~~~~~~~~~~~~~~~~~~
kEventMouseMoved -
What version of Xcode are you using ?
-
wrote on 24 Nov 2018, 21:46 last edited by
I am using Xcode 7.3.1
-
You are going to have to update. That version of Xcode is too old to build such a recent version of Qt. Or at least the platform plugin part.
-
wrote on 24 Nov 2018, 21:52 last edited by
ok, I think I need to upgrade OS as well.
-
Since the build is failing for the MySQL plugin, you likely have it somewhere
configure
found. -
Current version if macOS Mojave.
-
IIRC, you need Qt 5.12. MySQL removed the use of the my_bool type at some point. The plugin has been updated.
-
IIRC, you need Qt 5.12. MySQL removed the use of the my_bool type at some point. The plugin has been updated.
-
wrote on 24 Nov 2018, 22:45 last edited by
To summarize, I have oudated Xcode and Mysql :)
-
Your MySQL is not outdated as the current version is 8.0.13.
As for Xcode, the current version is 10.1 IIRC.
11/16