2013年10月25日 星期五

WinCE ignore Build Warning Message

使用compiler option - /W,/w來設定 Warning Level。

Warning Level
Description
/w
Turns off all warning messages. Use this option when you compile programs that deliberately include questionable statements. The /w option applies to the remainder of the command line, or applies until the next occurrence of a /w option on the command line. /W and /W0 are the same as /w.
/W1
Default. Displays severe warning messages.
/W2
Displays an intermediate level of warning messages. Level 2 includes warnings such as the following: 
  • Use of functions with no declared return type 
  • Failure to put return statements in functions with non-void return types 
  • Data conversions that would cause loss of data or precision
/W3
Displays a less severe level of warning messages, including warnings about function calls that precede their function prototypes in the source code.
/W4
Displays the least severe level of warning messages, including warnings about the use of non-ANSI features and extended keywords.
/WX
Treats all warnings as errors. If there are any warning messages, the compiler generates an error message, and continues compilation.

CL environment variable – 
SET CL=[[ [[option]] ... [[file]] ...]] [[/link [[ link-libinfo]] ]]
CLxxx [[option...]] file... [[option | file]]... [[lib...]]
[[/link link-opt...]][[@response-file]]
Argument
Description
Option
One or more compiler options.
  • All options apply to all specified source files.
File
Specifies the name of one or more source files, object files, or libraries. You must specify at least one file name. The compiler compiles the source files and passes the names of the object files and libraries to the linker.
Lib
Specifies one or more library names. The compiler passes the names of these libraries to the linker for processing.
Link-opt
Specifies one or more of the linker options. The compiler command passes these options to the linker for processing.
Response-file
Specifies a response file that can contain multiple options and file names that you would otherwise type on the command line or specify by using the CL environment variable.

沒有留言:

張貼留言