Generated ggo.c conflict with getopt.h from mac os x sdk
joao santinha <[email protected]> Fri, 22 Jan 2016 15:53:53 +0100
| Newsgroups | gmane.comp.gnu.gengetopt.general |
|---|---|
| Message-ID | <CA+JnR9wfuNU2eZiXa-Wvjt+vaRELe3THLobn4fufwwAfOPbR4Q@mail.gmail.com> |
--===============7995444011975004124== Content-Type: multipart/alternative; boundary=089e013a239c5125550529ed6395 --089e013a239c5125550529ed6395 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, I have a project in which I am using gengetopt to parse the command line arguments. From this project I create an executable and a library to be added to a mac os x application that I am developing. It happens that the definition of 'struct option=E2=80=99 in the ggo.c file generated is conflicting with the mac os x sdk since the sdk has the getopt.h that also defines 'struct option=E2=80=99 Bellow you can see the errors: /Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBinariz= eImage_ggo.c:504:8: Redefinition of 'option' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develo= per/SDKs/MacOSX10.11.sdk/usr/include/getopt.h:54:8: Previous definition is here /Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBinariz= eImage_ggo.c:789:40: Definition of 'struct option' must be imported from module 'Darwin.getopt' before it is required /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develo= per/SDKs/MacOSX10.11.sdk/usr/include/getopt.h:54:8: Previous definition is here Do you know any solution to this issue? I am not sure if this would solve it but I notice that the =E2=80=98struct getopt_data=E2=80=99 was changed to =E2=80=99struct custom_getopt_data=E2= =80=99. Would it be possible to do the same for the =E2=80=98struct option=E2=80=9D so it would= be possible to import and use gengetopt in an application created with a mac os x sdk? If needed I can create a simplified version of all the code and share it. Best regards, Joao --089e013a239c5125550529ed6395 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote"><div style=3D"word-wrap:break-w= ord"><span style=3D"font-family:HelveticaNeue">Hi all,</span><div style=3D"= font-family:HelveticaNeue"><br></div><div style=3D"font-family:HelveticaNeu= e">I have a project in which I am using gengetopt to parse the command line= arguments.</div><div style=3D"font-family:HelveticaNeue"><br></div><div st= yle=3D"font-family:HelveticaNeue">From this project I create an executable = and a library to be added to a mac os x application that I am developing.</= div><div style=3D"font-family:HelveticaNeue"><br></div><div style=3D"font-f= amily:HelveticaNeue">It happens that the definition of 'struct option= =E2=80=99 in the ggo.c file generated is conflicting with the mac os x sdk = since the sdk has the getopt.h that also defines 'struct option=E2=80= =99</div><div style=3D"font-family:HelveticaNeue"><br></div><div style=3D"f= ont-family:HelveticaNeue"><div>Bellow you can see the errors:</div><div><di= v>/Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBinar= izeImage_ggo.c:504:8: Redefinition of 'option'</div><div>/Applicati= ons/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M= acOSX10.11.sdk/usr/include/getopt.h:54:8: Previous definition is here</div>= <div>/Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBi= narizeImage_ggo.c:789:40: Definition of 'struct option' must be imp= orted from module 'Darwin.getopt' before it is required</div><div>/= Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develop= er/SDKs/MacOSX10.11.sdk/usr/include/getopt.h:54:8: Previous definition is h= ere</div></div></div><div style=3D"font-family:HelveticaNeue"><br></div><di= v style=3D"font-family:HelveticaNeue">Do you know any solution to this issu= e?</div><div style=3D"font-family:HelveticaNeue">I am not sure if this woul= d solve it but I notice that the =E2=80=98struct getopt_data=E2=80=99 was c= hanged to =E2=80=99struct custom_getopt_data=E2=80=99. Would it be possible= to do the same for the =E2=80=98struct option=E2=80=9D so it would be poss= ible to import and use gengetopt in an application created with a mac os x = sdk?</div><div style=3D"font-family:HelveticaNeue"><br></div><div style=3D"= font-family:HelveticaNeue">If needed I can create a simplified version of a= ll the code and share it.</div><div style=3D"font-family:HelveticaNeue"><br= ></div><div style=3D"font-family:HelveticaNeue">Best regards,</div><div sty= le=3D"font-family:HelveticaNeue">Joao</div></div></div><br></div> --089e013a239c5125550529ed6395-- --===============7995444011975004124== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gengetopt mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-gengetopt --===============7995444011975004124==--