是否可以在 getopt_long()
中关闭缩写?从手册页:
Long option names may be abbreviated if the abbreviation is unique or is an exact match for >some defined option.
我想这样做是因为我收到的一段代码规范要求标志的全长精确匹配,而且标志有很多。
最佳答案
代码猿,
似乎没有办法禁用缩写功能。您并不是唯一希望使用此功能的人。请参阅:http://sourceware.org/bugzilla/show_bug.cgi?id=6863
不幸的是,似乎 glibc 开发人员不想要该选项,因为上面链接的错误报告已通过“WONTFIX”解决。你可能在这里不走运:-\
关于linux - 关闭 getopt_long (optarg.h) 中的缩写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5182041/