我想从源代码为我的 macOS 版本 10.12.6 (Sierra) 构建新的 Qt5.10.0 版本。
这些错误发生在构建过程结束时:
qwebview_darwin.mm:261:24: error:
'loadFileURL:allowingReadAccessToURL:' is only available on macOS 10.11
or newer
[-Werror,-Wunguarded-availability]
[wkWebView loadFileURL:url.toNSURL()
^~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:102:1:
note:
'loadFileURL:allowingReadAccessToURL:' has been explicitly marked
partial here
- (nullable WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL API_AVAILAB...
^
qwebview_darwin.mm:261:24: note: enclose
'loadFileURL:allowingReadAccessToURL:' in an @available check to
silence this warning
[wkWebView loadFileURL:url.toNSURL()
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[4]: *** [.obj/debug/qwebview_darwin.o] Error 1
make[3]: *** [debug-install] Error 2
make[2]: *** [sub-webview-install_subtargets] Error 2
make[1]: *** [sub-src-install_subtargets] Error 2
make: *** [module-qtwebview-install_subtargets] Error 2
也许你有一些技巧来处理这个错误。你知道吗,我必须做什么?以及如何绕过这些错误?