[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-gengetopt] Generated ggo.c conflict with getopt.h from mac os x sd

From: joao santinha
Subject: [help-gengetopt] Generated ggo.c conflict with getopt.h from mac os x sdk
Date: Fri, 22 Jan 2016 15:53:53 +0100

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’ 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’

Bellow you can see the errors:
/Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBinarizeImage_ggo.c:504:8: Redefinition of 'option'
/Applications/ Previous definition is here
/Users/joaosantinha/CODE/pk/pk/build/test_joao/BinarizeImageProp3/pkBinarizeImage_ggo.c:789:40: Definition of 'struct option' must be imported from module 'Darwin.getopt' before it is required
/Applications/ 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 ‘struct getopt_data’ was changed to ’struct custom_getopt_data’. Would it be possible to do the same for the ‘struct option” 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]