PDA

View Full Version : Building Qt 5.6 from source against VC 2015



dolevo
29th October 2016, 19:56
Hi all,

I am trying to build QT 5.6.0 against Visual Studio 2015. I configured the Qt as follows:


configure -static -debug-and-release -commercial -confirm-license -opengl desktop -no-compile-examples -nomake tools -nomake examples -nomake tests -openssl-linked -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32"

However, I got the following error after some time:



link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFEST DEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.
0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\adueditor.exe @C:\Users\ayav\AppData\Local\Temp\nm3B66.tmp
Qt5SerialBusd.lib(qmodbusdevice.obj) :
error LNK2005: "class QLoggingCategory const & __cdecl QT_MODBUS(void)" (?QT_MODBUS@@YAABVQLoggingCategory@@XZ) already defined in mainwindow.objQt5SerialBusd.lib(qmodbusdevice.obj) :
error LNK2005: "class QLoggingCategory const & __cdecl QT_MODBUS_LOW(void)" (?T_MODBUS_LOW@@YAABVQLoggingCategory@@XZ) already defined in mainwindow.obj debug\adueditor.exe : fatal error LNK1169: one or more multiply defined symbols
found NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0 \VC\BIN\link.EXE"' : return code '0x491'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

Any thoughts?

dolevo
30th October 2016, 10:25
Nobody knows?

ChrisW67
30th October 2016, 12:08
https://bugreports.qt.io/browse/QTBUG-51745
https://codereview.qt-project.org/#/c/151832/

dolevo
31st October 2016, 14:23
Thanks. That's now fixed but now I bump into another one:


link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFEST DEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.
0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\tst_qcanbusdevice.exe @C:\Users\ayav\AppData\Local\Temp\
nm5038.tmp
tst_qcanbusdevice_plugin_import.obj : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_DummyBusPlugin(void)" (?qt_static_plugin_DummyBusPlugin@@YA?BUQStaticPlu gin@@XZ) referenced in function "public: __thiscall StaticDummyBusPluginPluginInstance::StaticDummyBus PluginPluginInstance(void)" (??0StaticDummyBusPluginPluginInstance@@QAE@XZ)
debug\tst_qcanbusdevice.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0 \VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

d_stranz
31st October 2016, 21:23
Qt CAN Bus is marked as a Technology Preview. From reading the documentation, it does not look like it is supported yet on Windows. You should exclude it from your configuration.