0

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

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector not working wextra

1 Answers1

0

D8021 suggests you are using MSVC, but you are providing command line switches for gcc...

MSVC does not have a command line switch named /Wextra, just /Wall

A quick search even here on SO would have answered your question:

  1. cmake invalid numeric argument '/Wextra'

  2. gcc -Wall -pedantic -Wextra in Visual Studio.

Sergio Monteleone
  • 2,776
  • 9
  • 21
  • still its not working in QT creator i am new in this can you give me another solution for this – Awais sakhi Dec 20 '18 at 12:56
  • cmake invalid numeric argument '/Wextra' i check this link they are saying like we have to add some code in CMakelist.txt file . this file where i can get in C:/Qt/ directory?. or in my project i have to make something like this File? – Awais sakhi Dec 20 '18 at 12:58