Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build QtOpcUa 5.12 [windows]



  • Hi, i want to build QtOpcUa for my Qt 5.12

    If i use qtopcua 5.11 the backend Open62541 is found, but with qtopcua 5.12 it is not..

    How to fix this please ?

    //qmake with qtopcua 5.11

    qmake c:\users\lagayev.meca\documents\lib\qtopcua -- OPEN62541_PREFIX=c:\users\lagayev.meca\documents\lib\
    open62541 OPEN62541_INCDIR=c:\users\lagayev.meca\documents\lib\open62541\build OPEN62541_LIBDIR=c:\users\lagayev.meca\documents\lib\open62541\build\bin
    Info: creating stash file C:\Users\lagayev.MECA\Documents\LIB\qtopcua\.qmake.stash
    Info: creating cache file C:\Users\lagayev.MECA\Documents\LIB\qtopcua\.qmake.cache
    
    Running configuration tests...
    Checking for FreeOpcua... no
    Checking for Open62541... yes
    Checking for Unified Automation C++ SDK... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt Opcua:
      FreeOpcua......................... no
      Open62541......................... yes
      Unified Automation C++ SDK........ no
    
    Qt is now configured for building. Just run 'mingw32-make'.
    Once everything is built, Qt is installed.
    You should NOT run 'mingw32-make install'.
    Note that this build cannot be deployed to other machines or devices.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    
    
    

    // qmake with qtopcua 5.12

    
    
    qmake c:\users\lagayev.meca\documents\lib\qtopcua -- OPEN62541_PREFIX=c:\users\lagayev.meca\documents\lib\
    open62541 OPEN62541_INCDIR=c:\users\lagayev.meca\documents\lib\open62541\build OPEN62541_LIBDIR=c:\users\lagayev.meca\documents\lib\open62541\build\bi
    n
    Info: creating stash file C:\Users\lagayev.MECA\Documents\LIB\qtopcua\.qmake.stash
    Info: creating cache file C:\Users\lagayev.MECA\Documents\LIB\qtopcua\.qmake.cache
    
    Running configuration tests...
    Checking for Open62541... no
    Checking for Unified Automation C++ SDK... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt Opcua:
      Open62541 .............................. no
      Unified Automation C++ SDK ............. no
      Support for namespace 0 NodeId names ... yes
      Namespace 0 NodeIds generator .......... no
    
    Qt is now configured for building. Just run 'mingw32-make'.
    Once everything is built, Qt is installed.
    You should NOT run 'mingw32-make install'.
    Note that this build cannot be deployed to other machines or devices.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    

    //configlog.txt generated in the build folder..

    looking for library open62541
    
    Trying source 0 (type inline) of library open62541 ...
    
      => source failed condition '!config.win32'.
    
    Trying source 1 (type inline) of library open62541 ...
    
    + cd /d C:\Users\lagayev.MECA\Documents\LIB\qtopcua\build\config.tests\open62541 
    && C:\Qt\5.12.0\mingw73_64\bin\qmake.exe 
    
    "CONFIG -= qt debug_and_release app_bundle lib_bundle"
    "CONFIG += shared warn_off console single_arch" 
    "QMAKE_LIBDIR += C:\\openssl\\lib C:\\Utils\\my_sql\\mysql-5.6.11-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.6.11-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += open62541" "QMAKE_LIBS_OPEN62541 = -Lc:\\users\\lagayev.meca\\documents\\lib\\open62541\\build\\bin -Lc:\\users\\lagayev.meca\\documents\\lib\\open62541/lib -lopen62541 -lws2_32" "QMAKE_INCDIR_OPEN62541 = c:\\users\\lagayev.meca\\documents\\lib\\open62541\\build" C:/users/lagayev.meca/documents/lib/qtopcua/config.tests/open62541
    
    > Info: creating stash file C:\Users\lagayev.MECA\Documents\LIB\qtopcua\build\config.tests\.qmake.stash
    + cd /d C:\Users\lagayev.MECA\Documents\LIB\qtopcua\build\config.tests\open62541 && set MAKEFLAGS=& mingw32-make
    
    > g++ -c -fno-keep-inline-dllexport -O2 -std=gnu++11 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1
    -IC:\users\lagayev.meca\documents\lib\qtopcua\config.tests\open62541 
    -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include 
    -IC:\Utils\postgresql\pgsql\include -Ic:\users\lagayev.meca\documents\lib\open62541\build 
    -IC:\Qt\5.12.0\mingw73_64\mkspecs\win32-g++  -o main.o C:\users\lagayev.meca\documents\lib\qtopcua\config.tests\open62541\main.cpp
    
    > C:\users\lagayev.meca\documents\lib\qtopcua\config.tests\open62541\main.cpp:38:33: fatal error: open62541/open62541.h: No such file or directory
    
    > compilation terminated.
    > Makefile:449: recipe for target 'main.o' failed
    > mingw32-make: *** [main.o] Error 1
     => source failed verification.
    Trying source 2 (type pkgConfig) of library open62541 ...
    pkg-config use disabled globally.
      => source produced no result.
    test config.qtopcua_opcua.libraries.open62541 FAILED
    looking for library uacpp
    Trying source 0 (type uacpp) of library uacpp ...
      => source failed condition 'config.win32 && var.QT_EDITION != 'OpenSource''.
    Trying source 1 (type uacpp) of library uacpp ...
      => source failed condition '!config.win32 && var.QT_EDITION != 'OpenSource''.
    test config.qtopcua_opcua.libraries.uacpp FAILED
    

  • Moderators

    @LeLev There might be very few people who have experience with Qt OPC UA on this forum.

    Try subscribing to and posting at the Interest mailing list



  • @JKSH hi, is this the right place ? automotive@lists.qt-project.org
    Unfortunately i have no answers here..



  • git checkout v5.11.0
    qmake 
    
    Qt Opcua:
      Open62541 .............................. yes
      Unified Automation C++ SDK ............. no
      Namespace 0 NodeIds generator .......... no
    
    git checkout v5.12.0
    qmake 
    
    Qt Opcua:
      Open62541 .............................. no
      Unified Automation C++ SDK ............. no
      Namespace 0 NodeIds generator .......... no
    


  • try to set:
    set INCLUDE=c:\path\to\open62541\build;%INCLUDE%
    set LIB=c:\path\to\open62541\build\bin;%LIB%

    This works for me.
    If it doesn't work take a look in build\config.log


  • Moderators



  • @LeLev
    I have the same problem. If you have solved it could you post your solution please?
    Thank you very much.



  • @Mogli123 hi,
    no sry, i could not build qtopcua5.12 ...



  • Hi,
    today I could build qtopcua 5.12
    0_1547026130858_Unbenannt_3.PNG

    Building Qt OPC UA with open62541



  • Hi, @Mogli123
    Thank you very much for the info


Log in to reply