Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLP_EXTERN_C missing in master/HEAD/Clp_C_Interface.h #283

Closed
amigalemming opened this issue Dec 30, 2023 · 3 comments
Closed

CLP_EXTERN_C missing in master/HEAD/Clp_C_Interface.h #283

amigalemming opened this issue Dec 30, 2023 · 3 comments

Comments

@amigalemming
Copy link

In the CLP -1.17.9 release I can reveal the definition of Clp_Simplex in Clp_C_Interface.h by defining the preprocessor symbol CLP_EXTERN_C. With master/HEAD this is not possible. However, I want to define more C wrappers to some C++ methods. How can I do this in a way that works for both the latest release and master/HEAD?

@svigerske
Copy link
Member

svigerske commented Jan 2, 2024

So you refer to

/* Real typedef for structure */
class CMessageHandler;
typedef struct {
  ClpSimplex *model_;
  CMessageHandler *handler_;
} Clp_Simplex;

(https://github.com/coin-or/CoinUtils/blob/86548bb58c06c562ea7291b2a8e884e840b490f4/CoinUtils/src/Coin_C_defines.h#L52-L57) from CoinUtils 2.11?

I suppose the cleaner way would be to add a function to the C interface of Clp that returns the ClpSimplex* from a given Clp_Simplex struct. Would that be sufficient?

@amigalemming
Copy link
Author

amigalemming commented Jan 2, 2024 via email

@tkralphs
Copy link
Member

tkralphs commented Jan 3, 2024

Yes. First of all I wonder, how this file enters the release archive, because it is not present in the Git master branch.

Releases are not made from master, they are made from stable/x.y. Our versioning system is documented here, although it is admittedly terse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants