Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Another zero as null pointer constant error

    Installation and Deployment
    3
    3
    1644
    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
      BK_Broiler last edited by

      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 Reply Quote 0
      • K
        koahnig @BK_Broiler last edited by

        @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 Reply Quote 1
        • kshegunov
          kshegunov Moderators last edited by

          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 Reply Quote 0
          • First post
            Last post