the default example canot be compiled with gengetopt-2.23 version
Hossein Aghakhani <[email protected]> Thu, 25 Jun 2020 20:59:51 -0500
| Newsgroups | gmane.comp.gnu.gengetopt.announce |
|---|---|
| Message-ID | <CAEM-pmsS1e-KzLPw-3LCCMz40FYe=s2mcijhKi3R3Jh10_=6ng@mail.gmail.com> |
--0000000000003713dc05a8f31168
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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 =E2=80=98int main(int, char**)=E2=80=99:
main1.cc:33:40: error: =E2=80=98struct gengetopt_args_info=E2=80=99 has no =
member named
=E2=80=98inputs_num=E2=80=99
33 | for ( unsigned i =3D 0 ; i < args_info.inputs_num ; ++i )
| ^~~~~~~~~~
main1.cc:34:35: error: =E2=80=98struct gengetopt_args_info=E2=80=99 has no =
member named
=E2=80=98inputs=E2=80=99
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
--0000000000003713dc05a8f31168
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi there,<div><br></div><div>I am new to=C2=A0gengetopt, h=
owever, it looks a very useful tool that I was looking for it for a long ti=
me.=C2=A0</div><div>I am trying to learn how does it work and for doing tha=
t, I am trying to redo the provided example in the original webpage at:=C2=
=A0<a href=3D"https://www.gnu.org/software/gengetopt/gengetopt.html">https:=
//www.gnu.org/software/gengetopt/gengetopt.html</a>. I have successfully in=
stalled the latest version (=C2=A0gengetopt-2.23), but when I want to compi=
le main1.cc as it says in the example I am getting the following error:</di=
v><div><br></div><div>main1.cc: In function =E2=80=98int main(int, char**)=
=E2=80=99:<br>main1.cc:33:40: error: =E2=80=98struct gengetopt_args_info=E2=
=80=99 has no member named =E2=80=98inputs_num=E2=80=99<br>=C2=A0 =C2=A033 =
| =C2=A0 for ( unsigned i =3D 0 ; i < args_info.inputs_num ; ++i )<br>=
=C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0^~~~~~~~~~<br>main1.cc:34:35: error: =E2=80=98struct gengetopt=
_args_info=E2=80=99 has no member named =E2=80=98inputs=E2=80=99<br>=C2=A0 =
=C2=A034 | =C2=A0 =C2=A0 cout << "file: " << args_inf=
o.inputs[i] << endl ;<br></div><div><br></div><div>I checked the head=
er file and it seems that the error is legitimate=C2=A0and that member=C2=
=A0has not been created for the=C2=A0gengetopt_args_info structure. I wonde=
r if you know how can I fix this issue or if you know that I am missing a p=
art. Thank you in advance for your help.</div><div><br></div><div>Regards,<=
/div><div>Hossein</div></div>
--0000000000003713dc05a8f31168--