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. error :-1: error: D8021 : invalid numeric argument '/Wextra'
Qt 6.11 is out! See what's new in the release blog

error :-1: error: D8021 : invalid numeric argument '/Wextra'

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 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.
  • A Offline
    A Offline
    aminnagpure
    wrote on last edited by
    #1

    iam working on project blockchain cryptocurrency
    but then i compiled it and run on windows 10 64 bit , it throws error
    :-1: error: D8021 : invalid numeric argument '/Wextra'

    can i know what it is all about

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Looks like you have a '/Wextra' in your code where you probably wanted "/Wextra"

      "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
      2
      • Paul ColbyP Offline
        Paul ColbyP Offline
        Paul Colby
        wrote on last edited by
        #3

        Hi @aminnagpure,

        The problem is most likely that the project file (*.pro or CMakeLists.txt) you're using is specifying a compiler flag that is only supported by clang / gcc, but not MSVC.

        Specifically, the -Wextra flag is used by clang and gcc (including MinGW) to enable extra compiler warnings. But cl.exe (the Microsoft compiler) does not support that flag (it uses something like /W4 or /Wall instead).

        Have you written your own project file?

        Cheers.

        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