VxWorks默认的注释类型是"/* ...... */", 在使用C++类型的注释"//",就有可能报错。



下面来自预编译器文档'-lang-c', '-lang-c89', '-lang-c++', '-lang-objc', '-lang-objc++', specify the source language.

  • `-lang-c' is the default; it allows recognition of C++ comments (comments that begin with '//' and end at end of line), since this is a common feature and it will most likely be in the next C standard.
  • '-lang-c89' disables recognition of C++ comments.
  • '-lang-c++' handles C++ comment syntax and includes extra default include directories for C++.
  • '-lang-objc' enables the Objective C '#import' directive.
  • '-lang-objc++' enables both C++ and Objective C extensions.

These options are generated by the compiler driver gcc, but not passed from the 'gcc' command line unless you use the driver's `-Wp' option.