Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(这是我上一个问题的扩展)。我在 Windows CLI 中使用 Splint。
XC8 嵌入式 C 编译器有一个自定义类型bit。为了让 Splint 解析,我可以将 CLI 选项传递给它:
bit
-Dbit=char
但是我需要将其替换bit为unsigned char. 空格字符是个问题。如何修改上述标志?
unsigned char
splint处理命令行参数中的引号和转义的是 shell,而不是。shell 最终将整个字符串-Dbit=unsigned char视为单个参数的任何结果都足够了,例如,在整个内容周围加上引号。
splint
-Dbit=unsigned char
(编辑:实际上,在 Windows 的情况下,在某些情况下,它可能不是处理引号和转义的 shell,但在整个事情周围加上双引号应该是可行的。)