Build QtOpcUa
-
Hi,
I want to update my QtQuick application to Qt5.12, the brobleme is that i use QtOpcUa i it, and i have the open source version, so i have to re-build open62541 and QtOpcUahttps://blog.basyskom.com/building-qt-opc-ua-with-open62541/
i have this error when i try to build qtopcua with mingw32-make (mingw730_64)
C:\Users\lev\Documents\LIB\qtopcua\build>mingw32-make cd src\ && ( if not exist Makefile C:\Qt\5.12.0\mingw73_64\bin\qmake.exe -o Makefile C:\Users\lev\Documents\LIB\qtopcua\src\src.pro ) && ming w32-make -f Makefile mingw32-make[1]: Entering directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src' cd opcua\ && ( if not exist Makefile C:\Qt\5.12.0\mingw73_64\bin\qmake.exe -o Makefile C:\Users\lev\Documents\LIB\qtopcua\src\opcua\opcua.pro ) && mingw32-make -f Makefile mingw32-make[2]: Entering directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src/opcua' mingw32-make -f Makefile.Release all mingw32-make[3]: Entering directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src/opcua' g++ -c -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop -overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BU ILD_OPCUA_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_Q STRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_FOREACH -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE _LIB -IC:\Users\lev\Documents\LIB\qtopcua\src\opcua -I. -I..\..\include -I..\..\include\QtOpcUa -I..\..\include\QtOpcUa\5.11.0 -I..\..\includ e\QtOpcUa\5.11.0\QtOpcUa -Itmp -IC:\Qt\5.12.0\mingw73_64\include -IC:\Qt\5.12.0\mingw73_64\include\QtGui -IC:\Qt\5.12.0\mingw73_64\include\QtANGLE -IC :\Qt\5.12.0\mingw73_64\include\QtCore\5.12.0 -IC:\Qt\5.12.0\mingw73_64\include\QtCore\5.12.0\QtCore -IC:\Qt\5.12.0\mingw73_64\include\QtCore -I.moc\re lease -I\include -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.12.0\mingw73_64\mksp ecs\win32-g++ -o .obj\release\qopcuaprovider.o C:\Users\lev\Documents\LIB\qtopcua\src\opcua\core\qopcuaprovider.cpp g++: error: unrecognized command line option '-Wshift-overflow=2' g++: error: unrecognized command line option '-Wduplicated-cond' Makefile.Release:1002: recipe for target '.obj/release/qopcuaprovider.o' failed mingw32-make[3]: *** [.obj/release/qopcuaprovider.o] Error 1 mingw32-make[3]: Leaving directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src/opcua' Makefile:40: recipe for target 'release-all' failed mingw32-make[2]: *** [release-all] Error 2 mingw32-make[2]: Leaving directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src/opcua' Makefile:41: recipe for target 'sub-opcua-make_first' failed mingw32-make[1]: *** [sub-opcua-make_first] Error 2 mingw32-make[1]: Leaving directory 'C:/Users/lev/Documents/LIB/qtopcua/build/src' Makefile:42: recipe for target 'sub-src-make_first' failed mingw32-make: *** [sub-src-make_first] Error 2
Microsoft Windows [version 6.1.7601]
Qt5.12.0can someone tell what are this errors please ?
g++: error: unrecognized command line option '-Wshift-overflow=2' g++: error: unrecognized command line option '-Wduplicated-cond'
Also, do i have to pick a special version of otopcua ? On the basyskom website they say
" First of all, an installation of Qt 5.11 is required. "
Can i build for Qt5.12 also ?
-
@LeLev said in Build QtOpcUa:
-Wshift-overflow=2
Your g++ compiler seems to be too old
See Bugreport
QTBUG-64820
Qt module builds fail with older GCC versions -
@karlheinzreichel thx!
i updated from 5.x.x to 7 and its running now.