Hi there,
I am new to gengetopt, however, it looks a very useful tool that I was looking for it for a long time.
I am trying to learn how does it work and for doing that, I am trying to redo the provided example in the original webpage at:
https://www.gnu.org/software/gengetopt/gengetopt.html. I have successfully installed the latest version ( gengetopt-2.23), but when I want to compile main1.cc as it says in the example I am getting the following error:
main1.cc: In function ‘int main(int, char**)’:
main1.cc:33:40: error: ‘struct gengetopt_args_info’ has no member named ‘inputs_num’
33 | for ( unsigned i = 0 ; i < args_info.inputs_num ; ++i )
| ^~~~~~~~~~
main1.cc:34:35: error: ‘struct gengetopt_args_info’ has no member named ‘inputs’
34 | cout << "file: " << args_info.inputs[i] << endl ;
I checked the header file and it seems that the error is legitimate and that member has not been created for the gengetopt_args_info structure. I wonder if you know how can I fix this issue or if you know that I am missing a part. Thank you in advance for your help.
Regards,
Hossein