Unresolved externals building Qt5.4.1 with webkit
-
I am trying to build Qt 5.4.1 from the source code in qt-everywhere-opensource-src-5.4.1.zip, downloaded from https://download.qt.io/archive/qt/5.4/5.4.1/single/.
I can build it without Webkit, but with Webkit I get these errors:
WebCored.lib(TextAllInOne.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl WebCore::TextCodecWin::registerExtendedCodecs(void (__cdecl*)(char const *,class WTF::PassOwnPtr<class WebCore::TextCodec> (__cdecl*)(class WebCore::TextEncoding const &,void const *),void const *))" (?registerExtendedCodecs@TextCodecWin@WebCore@@SAXP6AXPBDP6A?AV?$PassOwnPtr@VTextCodec@WebCore@@@WTF@@ABVTextEncoding@2@PBX@Z2@Z@Z) referenced in function "void __cdecl WebCore::extendTextCodecMaps(void)" (?extendTextCodecMaps@WebCore@@YAXXZ) WebCored.lib(TextAllInOne.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl WebCore::TextCodecWin::registerExtendedEncodingNames(void (__cdecl*)(char const *,char const *))" (?registerExtendedEncodingNames@TextCodecWin@WebCore@@SAXP6AXPBD0@Z@Z) referenced in function "void __cdecl WebCore::extendTextCodecMaps(void)" (?extendTextCodecMaps@WebCore@@YAXXZ)
I am building for the Windows 32-bit platform, using Visual Studio 2010, on Windows 7.
Here is the command-line with which I invoke the configure utility:
O:\vendorcustom\nokia\Qt\5.4.1\qtbase\configure.bat -top-level -debug -opensource -shared -I "O:\BuildWC\VAD\trunk\poseidon\vendor\openssl"\include -L "O:\BuildWC\VAD\trunk\poseidon\vendor\openssl"\lib -openssl -saveconfig QtConfig -nomake examples -nomake tests -confirm-license -make-tool jom -icu -D _SECURE_SCL=1
Here is the output from the configure utility:
Environment: INCLUDE= C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include O:\vendorbin\ibm\icu\55.1\include LIB= C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib O:\vendorbin\ibm\icu\55.1\lib PATH= C:\Python27 O:\vendorbin\ibm\icu\55.1\bin C:\jom\ O:\vendorcustom\nokia\Qt\5.4.1\qtbase\bin O:\vendorcustom\nokia\Qt\5.4.1\gnuwin32\bin C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\Bin\x64 C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\Bin\x86 C:\Program Files (x86)\Microsoft F#\v4.0\ C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Deploy C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 C:\WINDOWS\Microsoft.NET\Framework\v3.5 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCPackages C:\Program Files (x86)\HTML Help Workshop C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin C:\Perl64\site\bin C:\Perl64\bin C:\Program Files\CollabNet\Subversion Client C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\ C:\Program Files\Microsoft SQL Server\100\Tools\Binn\ C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ C:\Program Files\AstraTech\Hercules\bin C:\Program Files\TortoiseSVN\bin C:\Python27\x64 C:\Program Files (x86)\AstraTech\PERSEUS\bin C:\Program Files (x86)\AstraTech\Solon\bin C:\Test\Atlantis\PERSEUS\bin C:\Program Files\AstraTech\VAD6\bin C:\Program Files (x86)\AstraTech\3D Editor\bin C:\Program Files (x86)\Atlantis\PERSEUS\bin C:\Bob C:\Ruby200-x64\bin Configuration: pcre debug compile_examples Qt Configuration: minimal-config small-config medium-config large-config full-config debug shared zlib icu angle png freetype harfbuzz accessibility opengl opengles2 egl ssl openssl audio-backend wmf-backend native-gestures qpa concurrent QMAKESPEC...................win32-msvc2010 (env) Architecture................i386, features: Host Architecture...........i386, features: Maketool....................jom Debug.......................yes C++11 support...............auto Link Time Code Generation...no Accessibility support.......yes RTTI support................yes SSE2 support................yes SSE3 support................yes SSSE3 support...............yes SSE4.1 support..............yes SSE4.2 support..............yes AVX support.................yes AVX2 support................no NEON support................no OpenGL support..............yes Large File support..........yes NIS support.................no Iconv support...............no Evdev support...............no Mtdev support...............no Inotify support.............no eventfd(7) support..........no Glib support................no CUPS support................no OpenVG support..............no SSL support.................yes OpenSSL support.............yes Qt D-Bus support............no Qt Widgets module support...yes Qt GUI module support.......yes QML debugging...............yes DirectWrite support.........no Use system proxies..........no QPA Backends: GDI.....................yes Direct2D................no Third Party Libraries: ZLIB support............qt GIF support.............plugin JPEG support............plugin PNG support.............yes FreeType support........yes Fontconfig support......no HarfBuzz support........qt PCRE support............qt ICU support.............yes ANGLE...................yes Dynamic OpenGL..........no Styles: Windows.................yes Windows XP..............yes Windows Vista...........yes Fusion..................yes Windows CE..............no Windows Mobile..........no Sql Drivers: ODBC....................no MySQL...................no OCI.....................no PostgreSQL..............no TDS.....................no DB2.....................no SQLite..................plugin (qt) SQLite2.................no InterBase...............no Sources are in..............O:\vendorcustom\nokia\Qt\5.4.1\qtbase Build is done in............O:\vendorcustom\nokia\Qt\5.4.1\qtbase Install prefix..............O:\vendorcustom\nokia\Qt\5.4.1\qtbase Headers installed to........O:\vendorcustom\nokia\Qt\5.4.1\qtbase\include Libraries installed to......O:\vendorcustom\nokia\Qt\5.4.1\qtbase\lib Arch-dep. data to...........O:\vendorcustom\nokia\Qt\5.4.1\qtbase Plugins installed to........O:\vendorcustom\nokia\Qt\5.4.1\qtbase\plugins Library execs installed to..O:\vendorcustom\nokia\Qt\5.4.1\qtbase\bin QML1 imports installed to...O:\vendorcustom\nokia\Qt\5.4.1\qtbase\imports QML2 imports installed to...O:\vendorcustom\nokia\Qt\5.4.1\qtbase\qml Binaries installed to.......O:\vendorcustom\nokia\Qt\5.4.1\qtbase\bin Arch-indep. data to.........O:\vendorcustom\nokia\Qt\5.4.1\qtbase Docs installed to...........O:\vendorcustom\nokia\Qt\5.4.1\qtbase\doc Translations installed to...O:\vendorcustom\nokia\Qt\5.4.1\qtbase\translations Examples installed to.......O:\vendorcustom\nokia\Qt\5.4.1\qtbase\examples Tests installed to..........O:\vendorcustom\nokia\Qt\5.4.1\qtbase\tests Defines....................._SECURE_SCL=1 Include paths...............O:\BuildWC\VAD\trunk\poseidon\vendor\openssl\include Additional libraries........-LO:\BuildWC\VAD\trunk\poseidon\vendor\openssl\lib Info: creating super cache file O:\vendorcustom\nokia\Qt\5.4.1\.qmake.super Qt is now configured for building. Just run jom. To reconfigure, run jom confclean and configure.
When I examine the output from my build, I don't see any attempt to compile the source file
O:\vendorcustom\nokia\Qt\5.4.1\qtwebkit\Source\WebCore\platform\text\win\TextCodecWin.cpp,
which contains the unresolved externals.This makes me wonder whether some required .pro files have simply been left out of the .zip file that I downloaded, but I don't know enough about the Qt build system to be sure about that.
The same error is reported for 5.4.0 RC in QtWebkit compilation link error Windows. But at least one
person reports that they are able to build without the error. The last comment in that bug report has a workaround which involves changing a #if in qtwebkit\Source\WebCore\platform\text\TextEncodingRegistry.cpp, but that's another file that never gets compiled in my builds. The comment also suggests including the file in release builds, and says that debug builds already include it. But my debug build does not.Does anyone have any advice? I'd certainly appreciate it.
-
Hi and welcome to devnet,
You're only configuring qtbase. To configure all the modules, call configure from Qt's root folder.
On a side note, Qt doesn't belong to Nokia anymore since some times already ;)
-
Hi SGaist, and thanks for the reply.
Actually, I'm just running configure.bat in the Qt\5.4.1 root folder, and it contains
cd qtbase || exit /b 1
and
call %configure% -top-level %*
so that is why only qtbase is being configured. If I call configure.exe directly from Qt's root folder, I get
QMAKESPEC environment variable is set to "win32-msvc2010" which is not a supported platform See the README file for a list of supported operating systems and compilers.
The README in Qt's root folder does not in fact contain a list of supported operating systems and compilers but refers me to http://qt-project.org/wiki/Get_The_Source, which leads me to http://doc.qt.io/qt-5/windows-requirements.html#sdks-and-compilers, which gives instructions for building with Visual Studio 2010, which leads me to believe that win32-msvc2010 is a supported platform.
Have I taken a wrong turn somewhere?
As for having Nokia in my path to Qt - that's just because Qt did belong to Nokia at the time we started using it and set up our build environment. But thanks for pointing out the inaccuracy.
-
I've determined that the QMAKESPEC environment variable error was because an empty mkspecs folder had been created by one of my build attempts. I've fixed that now, so I'm left with this question:
The problem appears to be that the Qt source contains a configure.bat file in its root folder that only configures qtbase. What is the proper way to configure all the modules?
-
AFAIK and tested, calling configure from the top level should get you all modules compiled
-
Thanks again for the reply.
To call configure from the top level, I modified the configure.bat that is part of the Qt source. I simply commented out the change directory to qtbase. Then, after running jom clean and distclean, I rerun configure.bat, and get this error after the configuration tests have run:
Cannot read O:/vendorcustom/nokia/Qt/5.4.1: Access is denied. Error processing project file: O:\vendorcustom\nokia\Qt\5.4.1 Qmake failed, return code 3
I have full access to the Qt/5.4.1 folder, so I don't know why access is denied. It also seems strange that it says there is an error processing the project file, when the path in the error message only refers to the folder containing the file.
Does anyone know how I can fix this error?
-
Do you have an antivirus running ? Sometime they can interfere when something creates an executable.
In any case, modifying configure.bat should not be needed