Important: Please read the Qt Code of Conduct -

QtOpcUa build error.

  • Hi

    I'm trying to build the QtOpuUa lib with open62541 using qmake.
    i'm using this guide
    but when i run the mingw32-make .exe i get an error 5c74da4a-a98e-4183-a444-56bb61821505-image.png
    I'm at a loss and don't know how to continue.

    any suggestions?

  • @athyc have you tried the more recent blog from the link you posted?

  • Yes, same error it's the mingw32-make that's giving me issues :(

  • @athyc so you did these steps below, right?

    Execute the following commands in the “Qt 5.12.0 for Desktop (MinGW 5.3.0 32 bit)” shell

    git clone
    cd qtopcua
    git checkout 5.12
    mkdir build
    cd build
    qmake ..
    mingw32-make install

    could you post (as text, not an image please) the output where the error is showing up?

  • @Pablo-J-Rogina said in QtOpcUa build error.:

    I found it more useful to use one of the backends they are using with qtopcua. The Qt interface didn't provide a server and was client only at the time. I am having success using open62541 as a server in my Qt console application I am developing. YMMV

  • This post is deleted!

  • This post is deleted!

  • This post is deleted!

  • C:\Users\Desktop\OPCUA_lib>git clone
    Cloning into 'qtopcua'...
    remote: Counting objects: 8151, done.
    remote: Compressing objects: 100% (4183/4183), done.
    Rremote: Total 8151 (delta 5067), reused 6341 (delta 3892)
    Receiving objects: 100% (8151/8151), 2.48 MiB | 3.95 MiB/s, done.
    Resolving deltas: 100% (5067/5067), done.

    C:\Users\Desktop\OPCUA_lib>cd qtopcua

    C:\Users\Desktop\OPCUA_lib\qtopcua>git checkout 5.12
    Switched to a new branch '5.12'
    Branch '5.12' set up to track remote branch '5.12' from 'origin'.

    C:\Users\Desktop\OPCUA_lib\qtopcua>mkdir build

    C:\Users\Desktop\OPCUA_lib\qtopcua>cd build

    C:\Users\Desktop\OPCUA_lib\qtopcua\build>qmake ..
    Info: creating stash file C:\Users\Desktop\OPCUA_lib\qtopcua\build.qmake.stash
    Info: creating cache file C:\Users\Desktop\OPCUA_lib\qtopcua\build.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 .............................. yes
    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, you must run 'mingw32-make install'.
    Qt will be installed into 'C:\Qt\5.14.1\mingw73_64'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.

    cd src\ && ( if not exist Makefile C:\Qt\5.14.1\mingw73_64\bin\qmake.exe -o Makefile "C:\Users\Desktop\OPCUA_lib\qtopcua\src\" ) && mingw32-make -f Makefile
    mingw32-make[1]: Entering directory 'C:/Users//Desktop/OPCUA_lib/qtopcua/build/src'
    cd opcua\ && ( if not exist Makefile C:\Qt\5.14.1\mingw73_64\bin\qmake.exe -o Makefile "C:\Users\Desktop\OPCUA_lib\qtopcua\src\opcua\" ) && mingw32-make -f Makefile
    Project MESSAGE: perl -w C:\Qt\5.14.1\mingw73_64\bin\ -module QtOpcUa -version 5.12.8 -outdir "C:/Users//Desktop/OPCUA_lib/qtopcua/build" -builddir "C:/Users//Desktop/OPCUA_lib/qtopcua/build" C:/Users//Desktop/OPCUA_lib/qtopcua
    Use of uninitialized value $directory in concatenation (.) or string at C:\Qt\5.14.1\mingw73_64\bin\ line 691.
    fileparse(): need a valid pathname at C:\Qt\5.14.1\mingw73_64\bin\ line 694.
    Project ERROR: Failed to run: perl -w C:\Qt\5.14.1\mingw73_64\bin\ -module QtOpcUa -version 5.12.8 -outdir "C:/Users//Desktop/OPCUA_lib/qtopcua/build" -builddir "C:/Users//Desktop/OPCUA_lib/qtopcua/build" C:/Users//Desktop/OPCUA_lib/qtopcua
    mingw32-make[1]: *** [Makefile:52: sub-opcua-make_first] Error 3
    mingw32-make[1]: Leaving directory 'C:/Users//Desktop/OPCUA_lib/qtopcua/build/src'
    mingw32-make: *** [Makefile:53: sub-src-make_first] Error 2

  • So i did a reinstall of everything now, the error i get now is related to perl after i run mingw32-make.

    All steps at show above.

  • Switched to Qt 5.12.2 mingw73_32 still same error.

  • @athyc

    Project ERROR: Failed to run: perl

    1. Do you have Perl installed?
    2. If so, is it available in the path?
    3. What's the output of following command:
    perl -w C:\Qt\5.14.1\mingw73_64\bin\ -module QtOpcUa -version 5.12.8 -outdir

  • I just reinstalled Strawberry perl (32-bit) to ensure all versions are 32-bit.
    I changed the path from a desktop folder to the QT\mingw folder and cloned the git link there.
    It's running the mingw32-make now will update you when its done.

  • It works, got my first OPC connection now!

  • @athyc great, so please don't forget to mark your post as solved and upvote the answer(s) that helped you.

Log in to reply