Closed amigalemming closed 8 months ago
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?
On Mon, 1 Jan 2024, Stefan Vigerske wrote:
So you refer to
from CoinUtils 2.11?
Yes. First of all I wonder, how this file enters the release archive, because it is not present in the Git master branch.
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?
I think yes. But then there should be a version bump such that I can switch between using the preprocessor symbol or using that accessor function.
In the CLP -1.17.9 release I can reveal the definition of
Clp_Simplex
inClp_C_Interface.h
by defining the preprocessor symbolCLP_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?