Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Building QFreeOpcUaPlugin and QOpen62541Plugin plugins Qt 5.10

    General and Desktop
    5
    14
    3799
    Loading More Posts
    • 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.
    • B
      Bolonat last edited by

      I have an OPC UA server. I need to implement OPC UA Client. I'm working in QtCreator 4.5.0 on Qt 5.10.0 (MinGW 32 bit Win10 64x). For my purpose, I want to use the qtopcua component. I assembled and installed the component from the sources to github using the command sequence, qmake, mingw32-make, mingw32-make install. Now, if I add Qt + = opcua to the .pro file of my project, the project is successfully compiled. However, when I try to run the example that comes with the qtopcua source, it turned out that it requires QFreeOpcUaPlugin and QOpen62541Plugin plugins to work for it. Makefiles for these plugins come with the source code qtopcua. During execution of mingw32-make, the Makefile generated .cpp and .h. Now I need to install plugins in mingw \ plugins. I tried to compile the source code of the plugins in QtCreator. But I encountered dependencies. In the file open62541.pro the line "win32: LIBS + = open62541.lib ws2_32.lib" I put open62541.lib in the build folder, but when compiling I get the error: "Library 'open62541' is not defined". The QFreeOpcUaPlugin plugin is dependent on the boost and freeopcua libraries, so also compiles with errors. How can I correctly build and install these plugins? Many thanks.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Did you get all the dependencies ? If so, did you get them for the compiler you are using ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • B
          Bolonat last edited by

          I commented out the line
          QMAKE_USE_PRIVATE + = open62541
          in the open62541.pro file. After that, the error disappeared. But I have got another mistake:

          C: \ qtopcua-dev \ src \ plugins \ opcua \ open62541 \ qopen62541backend.cpp: 366: error: 'UA_ClientConfig_default' was not declared in this scope
                m_uaclient = UA_Client_new (UA_ClientConfig_default);

          1 Reply Last reply Reply Quote 0
          • B
            Bolonat last edited by

            When I try to build a plugin QFreeOpcUaPlugin, I get a set of errors:
            undefined reference to OpcUa::UaClient::GetNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' undefined reference to OpcUa::Node::Node(OpcUa::Node const&)'
            undefined reference to OpcUa::NodeId::NodeId()' undefined reference to OpcUa::Node::GetId() const'
            undefined reference to OpcUa::Node::GetChildren() const' undefined reference to OpcUa::Node::GetId() const'
            .........
            I do not understand what I need to add, what is missing.

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              The libraries from the backend you want to use. i.e.: open62541 or FreeOpcUa.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • B
                Bolonat last edited by

                Now I got open62541_backend.dll, open62541_backendd.dll and libs in mingw53_32\plugins\opcua. But when I try to to compile example - project "accontrol" I got an error: E:\PROJECTS\accontrol\accontroltest.cpp:54: QtOpcUa/QOpcUaMonitoredValue: No such file or directory.
                QOpcUaMonitoredValue class is missing in the source qtopcua-dev... Any ideas, please...

                N 1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Base on this commit, I'd say the example hasn't been update yet.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  F 1 Reply Last reply Reply Quote 0
                  • N
                    N3ff3 last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • N
                      N3ff3 @Bolonat last edited by

                      Hi guays,

                      I am at the same staep as you. I have done the steps qmake, mingw32-make, mingw32-make install.
                      And then I have the same problem with the open62541 and freeopcua.

                      My question is now, how do you get the open62541_backend.dll, open62541_backendd.dll and libs?

                      Many thanks in advance!

                      Greetings

                      F 1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Hi,

                        AFAIK, build the corresponding project.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 0
                        • F
                          fmeerkoetter @SGaist last edited by

                          @SGaist You are right. The API is currently settling down. There will be a Tech Preview in Qt 5.11. The examples you currently find on the dev branch are outdated. New examples are in the pipeline. You can find the first here: https://codereview.qt-project.org/#/c/216519/

                          1 Reply Last reply Reply Quote 0
                          • F
                            fmeerkoetter @N3ff3 last edited by

                            @N3ff3 please have a look at this article:
                            https://blog.basyskom.com/2018/want-to-give-qt-opcua-a-try/

                            You should go with the open62541 backend. Open62541 is the more complete implementation and has a much more active community.

                            Note that open62541 will release their 0.3 version in the next few weeks. We plan to use this release in the Tech Preview in Qt 5.11.

                            N P 2 Replies Last reply Reply Quote 1
                            • N
                              N3ff3 @fmeerkoetter last edited by

                              @fmeerkoetter
                              thank you very much for the information and the link.

                              Now I am testing the QtOpcUa. For this I use the Softing OPC UA .net Demo Server. The Problem is, that I can't connect to the server. I get this error message:

                              error/client	No suitable UserTokenPolicy found for the possible endpoints
                              

                              After reading the docs of QtOpcUa, I can't find anything about the Policy.

                              Is there anything which I can use?

                              Best regards
                              N3ff3

                              1 Reply Last reply Reply Quote 1
                              • P
                                paulholloway @fmeerkoetter last edited by

                                @fmeerkoetter said in Building QFreeOpcUaPlugin and QOpen62541Plugin plugins Qt 5.10:

                                @N3ff3 please have a look at this article:
                                https://blog.basyskom.com/2018/want-to-give-qt-opcua-a-try/ https://cheapessaywriter.net/

                                You should go with the open62541 backend. Open62541 is the more complete implementation and has a much more active community.

                                Note that open62541 will release their 0.3 version in the next few weeks. We plan to use this release in the Tech Preview in Qt 5.11.

                                I read that open62541 is the most stable and feature complete open source backend presently in Qt OPC UA so you won't experience any difficulties.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post