Library not found for -lQt5WebKitWidgets
So I’m trying to incorporate WebKit into a simple test program.
I downloaded the following archive files..qtwebkit-tp5-qt58-mingw530-x86 for Window7 and qtwebkit-tp5-qt58-darwin-x64 for Mac Sierra10.12.2
I have installed the Qt5.8 commercial IDE on the Mac and Win computer.
There were no instructions on how to incorporate the WebKit archives into Qt5.8 so I simply copied the files from the archive file folder structure to the equivalent folder in the 5.8 folder structure. Probably not the way it’s supposed to be done, but it worked for Windows.
For Windows, I created a simple Widget base UI the main window had a single widget. A QWidget promoted to a QWebView. The QWebView was loaded with a simple HTML file that contained a link to a valid url on the www. Works fine.
When I tried the same thing on the Mac system things did not work. I used the same .pro file and all the same files for both builds.
The .pro file has QT += webkit webkitwidgets.
The Mac test program compiles but fails during linking..
ld: library not found for -lQt5WebKitWidgets
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [QWebViewTest.app/Contents/MacOS/QWebViewTest] Error 1
14:02:40: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project QWebViewTest (kit: Desktop Qt 5.8.0 clang 64bit)
Which makes sense. Because the qtwebkit-tp5-qt58-darwin-x64 archive does not contain any “Qt5” libraries. All the libraries are there but without the “5”. IE: QtWebKitWidgets.framework but not Qt5WebKitWidgets.framework
The only references to “Qt5” in the Darwin archive are in the cmake folders/files in the CMAKE library subfolder.
Did I use the wrong MacOS archive?
Did I merger the archive with Qt5.8 in the wrong way?
Was this a archive packaging error?
Hints here fixed the linking problem..
This pull request will fix the issue, it will be integrated into the next release https://github.com/annulen/webkit/pull/388