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. why does my program need Qt5Network.dll? even with -network in .pro?
Forum Updated to NodeBB v4.3 + New Features

why does my program need Qt5Network.dll? even with -network in .pro?

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 5 Posters 3.7k Views 3 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
    mbruel
    wrote on 8 May 2018, 08:32 last edited by
    #1

    Hello,
    I've done a console application depending on QtCore, QtXml and QtXmlPatterns.
    When I build for Windows, the exe needs Qt5Network.dll.
    Any ideas why?
    Here is my .pro config:

    QT += core xml xmlpatterns
    QT -= gui network
    CONFIG -= app_bundle
    CONFIG += c++11
    
    CONFIG(release, debug|release): DEFINES += QT_NO_DEBUG_OUTPUT
    
    TEMPLATE = app
    

    Cheers

    K 1 Reply Last reply 8 May 2018, 08:36
    0
    • M mbruel
      8 May 2018, 08:32

      Hello,
      I've done a console application depending on QtCore, QtXml and QtXmlPatterns.
      When I build for Windows, the exe needs Qt5Network.dll.
      Any ideas why?
      Here is my .pro config:

      QT += core xml xmlpatterns
      QT -= gui network
      CONFIG -= app_bundle
      CONFIG += c++11
      
      CONFIG(release, debug|release): DEFINES += QT_NO_DEBUG_OUTPUT
      
      TEMPLATE = app
      

      Cheers

      K Offline
      K Offline
      koahnig
      wrote on 8 May 2018, 08:36 last edited by
      #2

      @mbruel

      Did you change from

      QT +=network
      

      to

      QT -= network
      

      recently?
      Try to rerun qmake and make a complete rebuild of the project.
      Note, also if one of your other libraries requires network there might be the cause.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • P Offline
        P Offline
        Paul Colby
        wrote on 8 May 2018, 08:38 last edited by
        #3

        Hi @mbruel,

        It's because xmlpatterns depends on the network module (eg for schema and XML query features).

        Cheers.

        1 Reply Last reply
        3
        • M Offline
          M Offline
          mbruel
          wrote on 8 May 2018, 09:15 last edited by
          #4

          ok thanks,
          in fact I was also using QHostInfo that directly depends on the network module.
          I've removed this call and also the dependency on xmlpatterns that I didn't really need.
          All good now, I just need Qt5Core.dll and Qt5Xml.dll.

          I still have something bothering me, when I excute the program on Windows 10, I've a security alert.
          alt text
          Any ideas why?
          The app is lanched via a batch script using a simple argument. It load an xml file, does some computation and generate xml reports.

          M 1 Reply Last reply 8 May 2018, 09:18
          0
          • M mbruel
            8 May 2018, 09:15

            ok thanks,
            in fact I was also using QHostInfo that directly depends on the network module.
            I've removed this call and also the dependency on xmlpatterns that I didn't really need.
            All good now, I just need Qt5Core.dll and Qt5Xml.dll.

            I still have something bothering me, when I excute the program on Windows 10, I've a security alert.
            alt text
            Any ideas why?
            The app is lanched via a batch script using a simple argument. It load an xml file, does some computation and generate xml reports.

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 8 May 2018, 09:18 last edited by
            #5

            @mbruel
            Hi its hard to guess at what triggers the warning.
            Try upload .exe to
            https://www.virustotal.com
            and see what it says.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbruel
              wrote on 8 May 2018, 09:45 last edited by
              #6

              well the app is quite confidential so I can't upload it online.
              I've done an basic installer using Inno Setup (so I package the exe and the Qt dlls) and now it is not triggering the anti-virus.
              Is it because it is registering the app in the Windows registry? (I'm setting an AppId)

              M 1 Reply Last reply 8 May 2018, 10:08
              0
              • M mbruel
                8 May 2018, 09:45

                well the app is quite confidential so I can't upload it online.
                I've done an basic installer using Inno Setup (so I package the exe and the Qt dlls) and now it is not triggering the anti-virus.
                Is it because it is registering the app in the Windows registry? (I'm setting an AppId)

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 8 May 2018, 10:08 last edited by
                #7

                @mbruel
                Ok. All from access c:\ to .bat files, to registry access can trigger
                such false positives. Only Trend Micro can really say.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  VRonin
                  wrote on 8 May 2018, 10:58 last edited by
                  #8

                  As reported by trend micro that message is just telling you that the program you are executing is "unusual" and couldn't find reputation information for it online. That's just natural given you are building it and not distributing it. Your antivirus is just being overly-protective, this has nothing to do with Qt or anything else

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  1 Reply Last reply
                  3

                  1/8

                  8 May 2018, 08:32

                  • Login

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