Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Another zero as null pointer constant error
QtWS25 Last Chance

Another zero as null pointer constant error

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 3 Posters 2.0k Views
  • 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 Offline
    B Offline
    BK_Broiler
    wrote on last edited by
    #1

    I successfully generated the appropriate make files to build a static version of QT5.7 from qt-everywhere-oppensource-src-5.7.0.zip using the gcc g++ C++11 compiler and windows 7.
    However, while running ming32-make, one of the make files would terminate early because gcc would generate a zero as null pointer constant warning from one of the header files, which would then cause g++ to exit because the make file compiled it with the -Werror option, which generates an error on any warning.
    I traced the problem to one of the .conf files qmake used to build the make files. The .conf loads qtbase\mkspecs\features\qt_module.prf, which in turn loads qt_module_header.prf
    At line 198, I commented out hcleanFLAGS += -Wzero-as-null-pointer-constant.
    Once I did this, I was able to successfully make the static version of Qt5.7

    K 1 Reply Last reply
    0
    • B BK_Broiler

      I successfully generated the appropriate make files to build a static version of QT5.7 from qt-everywhere-oppensource-src-5.7.0.zip using the gcc g++ C++11 compiler and windows 7.
      However, while running ming32-make, one of the make files would terminate early because gcc would generate a zero as null pointer constant warning from one of the header files, which would then cause g++ to exit because the make file compiled it with the -Werror option, which generates an error on any warning.
      I traced the problem to one of the .conf files qmake used to build the make files. The .conf loads qtbase\mkspecs\features\qt_module.prf, which in turn loads qt_module_header.prf
      At line 198, I commented out hcleanFLAGS += -Wzero-as-null-pointer-constant.
      Once I did this, I was able to successfully make the static version of Qt5.7

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @BK_Broiler

      Did you run the whole process with default settings otherwise?
      If you did I am wondering, why you are runinng into this problem. Did you check the forum for similar reports with Qt5.7.0? You can also check on JIRA, if this is a known problem/bug.
      I ahve not compiled Qt for myself for a while. Is the -Werror set as standard?
      In the past there were always numerous warnings without real effect on usability. However, setting the -Werror flag would have caused for sure a stop in the make process.

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

      1 Reply Last reply
      1
      • kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        I believe -Werror is enforced only for dev builds, could you provide the commands you issued to build Qt?

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0

        • Login

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