Search code examples
cargumentsgnugetoptargp

What's the difference between argp and getopt?


I think the title is self explanatory. I am making a program and I was wondering what I should use of the two and why.


Solution

  • argp may be more flexible / powerful / etc, but getopt is part of the POSIX standard. Thats a choice you've to make based on whether you expect your program to be portable.