Edit

Share via


Fatal Error C1049

invalid numerical argument 'value'

The CL.EXE command-line parser found value where it was expecting a numerical argument.

A C1049 error may occur when the compiler can't find a numerical argument for one of these compiler options:

/constexpr:depth
/constexpr:backtrace
/constexpr:steps

Command-line compiler options that expect a numerical argument may also report Command line error D8004, Command line error D8021, Command line warning D9002, Command line warning D9014, or Command line warning D9024.

To resolve this error, examine the command line for misplaced or missing arguments. Verify there's no unexpected whitespace between options and arguments. The final command line may be generated by macros, environment variables, or other build system operations. That's why it's important to look at the actual command line passed to the compiler.

  • In command files or makefiles, you can use an echo command to report the actual command line.

  • In Visual Studio, open your project's Property Pages dialog. On the Configuration Properties > C/C++ > General page, change the Suppress Startup Banner property to No. Choose OK to save your changes. The Output window now shows the command line when you build, right after the copyright line.

Other build systems may have log files or verbose options, to see the actual commands used. For information, check your build system documentation.