Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. using opc ua in qt

using opc ua in qt

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 3 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mogli123
    wrote on last edited by
    #3

    I work on windows.
    I do not know where to insert the comments.

    1 Git clone https://github.com/open62541/open62541.git
    2 cd open62541
    3 git checkout 644761ff
    4 mkdir build
    ...

    In cmd of windows or in a shell of qt if it exists?

    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by ODБOï
      #4

      You need to install git/tortoise git (for use git and clone the projects open62541 / qtopcua)

      when installing git, there may be an option 'add to environment variable' check this option to automatically configure your PATH.

      when it is installed open your normal windows terminal and write :

      git
      

      if it is recognizing you are good to go, if not, you need to config you PATH

      ... same thing for qmake/make / cmake

      what compiler do you use ?

      Note :qtopcua 5.11.0 works perfectly, but i could not build qtopcua 5.12 for the moment, https://forum.qt.io/topic/97476/build-qtopcua-5-12-windows/2

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Mogli123
        wrote on last edited by
        #5

        Thank you very much
        I will try it.
        I answer if it works for me or not.

        Mh ok thanks for the hint, I would like to build Qtopcua on Qt 5.12, too.

        ODБOïO 1 Reply Last reply
        0
        • M Mogli123

          Thank you very much
          I will try it.
          I answer if it works for me or not.

          Mh ok thanks for the hint, I would like to build Qtopcua on Qt 5.12, too.

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #6

          @Mogli123 i clarify :

          i use Qt 5.12 and i build :

          QtOpcUa 5.11 : success
          QtOpcUa 5.12 : fail

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mogli123
            wrote on last edited by Mogli123
            #7

            When I try to run:

            cmake -DCMAKE_BUILD_TYPE = Share -G "MinGW Makefiles" -DUA_ENABLE_AMALGAMATION = ON -DCMAKE_INSTALL_PREFIX = c: \ Qt_5_12_MinGW \ open62541\build ..

            I get the following error:
            CMake error: The source directory "c: Qt_5_12_MinGW / open62541 / build" is not against containing CMakeLists.txt.

            I run this code in the build folder like in the discripiton.
            I have installed MinGW64
            is this a problem?

            What am I doing wrong?

            1 Reply Last reply
            0
            • ODБOïO Offline
              ODБOïO Offline
              ODБOï
              wrote on last edited by
              #8

              @Mogli123 hi, try to add .. at the end of your command

              M 1 Reply Last reply
              0
              • ODБOïO ODБOï

                @Mogli123 hi, try to add .. at the end of your command

                M Offline
                M Offline
                Mogli123
                wrote on last edited by Mogli123
                #9

                @LeLev
                hi,
                I have the 2 dots allready in my code like in my post above

                When I run:

                cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_INSTALL_PREFIX=c:\path\to\open62541-mingw-install ..

                I get this error:

                CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMake_Make_PROGRAM is not set. You probably need to select a different build tool.
                CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMake_Make_PROGRAM is not set. You probably need to select a different build tool.
                CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
                CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

                I have no experience to work with the shell therefore I have no idea what I can do to solve the error.

                ODБOïO 1 Reply Last reply
                0
                • M Mogli123

                  @LeLev
                  hi,
                  I have the 2 dots allready in my code like in my post above

                  When I run:

                  cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_INSTALL_PREFIX=c:\path\to\open62541-mingw-install ..

                  I get this error:

                  CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMake_Make_PROGRAM is not set. You probably need to select a different build tool.
                  CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMake_Make_PROGRAM is not set. You probably need to select a different build tool.
                  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
                  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

                  I have no experience to work with the shell therefore I have no idea what I can do to solve the error.

                  ODБOïO Offline
                  ODБOïO Offline
                  ODБOï
                  wrote on last edited by
                  #10

                  @Mogli123 see if this can help
                  https://stackoverflow.com/questions/45150172/cmake-error-cmake-was-unable-to-find-a-build-program-corresponding-to-mingw-ma?rq=1

                  M 1 Reply Last reply
                  1
                  • ODБOïO ODБOï

                    @Mogli123 see if this can help
                    https://stackoverflow.com/questions/45150172/cmake-error-cmake-was-unable-to-find-a-build-program-corresponding-to-mingw-ma?rq=1

                    M Offline
                    M Offline
                    Mogli123
                    wrote on last edited by
                    #11

                    @LeLev
                    thank you :)
                    adding links to the system path solved the problem

                    but now I have a building problem with

                    mingw32-make

                    error:

                    cc1.exe: error: unrecognized command line option "-Wpedantic"
                    cc1.exe: warnings being treated as errors
                    cc1.exe: error:unrecognized command line option "-Wno-static-in-inline"
                    ...

                    if one error is solved the next one will follow:(

                    ODБOïO 1 Reply Last reply
                    0
                    • M Mogli123

                      @LeLev
                      thank you :)
                      adding links to the system path solved the problem

                      but now I have a building problem with

                      mingw32-make

                      error:

                      cc1.exe: error: unrecognized command line option "-Wpedantic"
                      cc1.exe: warnings being treated as errors
                      cc1.exe: error:unrecognized command line option "-Wno-static-in-inline"
                      ...

                      if one error is solved the next one will follow:(

                      ODБOïO Offline
                      ODБOïO Offline
                      ODБOï
                      wrote on last edited by
                      #12

                      @Mogli123
                      Can you please check your mingw version ? with mingw32-make -ver

                      i used mingw that comes with qt, adding this to system path

                      C:\Qt\5.12.0\mingw73_64\bin

                      M 1 Reply Last reply
                      0
                      • ODБOïO ODБOï

                        @Mogli123
                        Can you please check your mingw version ? with mingw32-make -ver

                        i used mingw that comes with qt, adding this to system path

                        C:\Qt\5.12.0\mingw73_64\bin

                        M Offline
                        M Offline
                        Mogli123
                        wrote on last edited by
                        #13

                        @LeLev
                        Thank you very much for taking the time to help me

                        I'm using mingw from qt, too.

                        my mingw version is:
                        GNU Make 4.2.1
                        Cuilt for x86_64-w64-mingw32
                        Copyright....

                        I add the same as you to the system path

                        ODБOïO 1 Reply Last reply
                        0
                        • M Mogli123

                          @LeLev
                          Thank you very much for taking the time to help me

                          I'm using mingw from qt, too.

                          my mingw version is:
                          GNU Make 4.2.1
                          Cuilt for x86_64-w64-mingw32
                          Copyright....

                          I add the same as you to the system path

                          ODБOïO Offline
                          ODБOïO Offline
                          ODБOï
                          wrote on last edited by ODБOï
                          #14

                          @Mogli123 when you call cmake .. see if your output is ~similar to mine
                          maybe you need to update gcc

                          cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DUA_ENABLE_AMALGAMATION=ON ..
                          -- The C compiler identification is GNU 5.1.0
                          -- The CXX compiler identification is GNU 5.1.0
                          -- Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe
                          -- Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe -- works
                          -- Detecting C compiler ABI info
                          -- Detecting C compiler ABI info - done
                          -- Detecting C compile features
                          -- Detecting C compile features - done
                          -- Check for working CXX compiler: C:/TDM-GCC-64/bin/g++.exe
                          -- Check for working CXX compiler: C:/TDM-GCC-64/bin/g++.exe -- works
                          -- Detecting CXX compiler ABI info
                          -- Detecting CXX compiler ABI info - done
                          -- Detecting CXX compile features
                          -- Detecting CXX compile features - done
                          -- Found PythonInterp: C:/Users/lev/AppData/Local/Programs/Python/Python36-32/python.exe (found version "3.6.5")
                          -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.16.2.windows.1")
                          -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
                          -- Could NOT find LATEX (missing: LATEX_COMPILER)
                          -- Configuring done
                          -- Generating done
                          -- Build files have been written to: C:/Users/lev/Documents/LIB/open62541/build
                          
                          M 1 Reply Last reply
                          0
                          • ODБOïO ODБOï

                            @Mogli123 when you call cmake .. see if your output is ~similar to mine
                            maybe you need to update gcc

                            cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DUA_ENABLE_AMALGAMATION=ON ..
                            -- The C compiler identification is GNU 5.1.0
                            -- The CXX compiler identification is GNU 5.1.0
                            -- Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe
                            -- Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe -- works
                            -- Detecting C compiler ABI info
                            -- Detecting C compiler ABI info - done
                            -- Detecting C compile features
                            -- Detecting C compile features - done
                            -- Check for working CXX compiler: C:/TDM-GCC-64/bin/g++.exe
                            -- Check for working CXX compiler: C:/TDM-GCC-64/bin/g++.exe -- works
                            -- Detecting CXX compiler ABI info
                            -- Detecting CXX compiler ABI info - done
                            -- Detecting CXX compile features
                            -- Detecting CXX compile features - done
                            -- Found PythonInterp: C:/Users/lev/AppData/Local/Programs/Python/Python36-32/python.exe (found version "3.6.5")
                            -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.16.2.windows.1")
                            -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
                            -- Could NOT find LATEX (missing: LATEX_COMPILER)
                            -- Configuring done
                            -- Generating done
                            -- Build files have been written to: C:/Users/lev/Documents/LIB/open62541/build
                            
                            M Offline
                            M Offline
                            Mogli123
                            wrote on last edited by
                            #15

                            @LeLev

                            I delet the fils in the build folder

                            try cmake again and all works fine

                            I don't know why....

                            THANK you very much for your helping

                            that is now qopcua 5.12?
                            Should I load the 5.11 version, because you noticed that the 5.12 does not work for you?

                            ODБOïO 1 Reply Last reply
                            1
                            • M Mogli123

                              @LeLev

                              I delet the fils in the build folder

                              try cmake again and all works fine

                              I don't know why....

                              THANK you very much for your helping

                              that is now qopcua 5.12?
                              Should I load the 5.11 version, because you noticed that the 5.12 does not work for you?

                              ODБOïO Offline
                              ODБOïO Offline
                              ODБOï
                              wrote on last edited by
                              #16

                              @Mogli123 right click on your cloned qtopcua folder> TortoiseGit > Show log to see the version.

                              Please try to build the qtopcua 5.12 and tell me if it works for you.

                              qmake c:\users\lev\Documents\LIB\qtopcua -- OPEN62541_PREFIX=c:\users\lev\document
                              s\lib\open62541 OPEN62541_INCDIR=c:\users\lev\documents\lib\open62541\build OPEN62541_LIBDIR=c:\users\lev\documents\lib\open62541\bu
                              ild\bin
                              mingw32-make
                              mingw32-make install
                              
                              M 1 Reply Last reply
                              0
                              • ODБOïO ODБOï

                                @Mogli123 right click on your cloned qtopcua folder> TortoiseGit > Show log to see the version.

                                Please try to build the qtopcua 5.12 and tell me if it works for you.

                                qmake c:\users\lev\Documents\LIB\qtopcua -- OPEN62541_PREFIX=c:\users\lev\document
                                s\lib\open62541 OPEN62541_INCDIR=c:\users\lev\documents\lib\open62541\build OPEN62541_LIBDIR=c:\users\lev\documents\lib\open62541\bu
                                ild\bin
                                mingw32-make
                                mingw32-make install
                                
                                M Offline
                                M Offline
                                Mogli123
                                wrote on last edited by
                                #17

                                @LeLev

                                It seems that I have the 5.11 version
                                0_1545216990793_Unbenannt_2.PNG

                                I runed the code like in the discripiton

                                0_1545217141684_Unbenannt_3.PNG

                                I see no error but howe can I test if it works?
                                sorry if this is a stupid question

                                ODБOïO 1 Reply Last reply
                                0
                                • M Mogli123

                                  @LeLev

                                  It seems that I have the 5.11 version
                                  0_1545216990793_Unbenannt_2.PNG

                                  I runed the code like in the discripiton

                                  0_1545217141684_Unbenannt_3.PNG

                                  I see no error but howe can I test if it works?
                                  sorry if this is a stupid question

                                  ODБOïO Offline
                                  ODБOïO Offline
                                  ODБOï
                                  wrote on last edited by
                                  #18

                                  @Mogli123 said in using opc ua in qt:

                                  howe can I test if it works?

                                  create a project, a class, include <QtOpcUa> , create QScopedPointer<QOpcUaClient> m_client; , compile

                                  1 Reply Last reply
                                  2

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved