Closed ghorn closed 5 months ago
Would you accept a PR for this? I would split the header into include/Clarabel
(C++) and include/Clarabel.h
(C).
I just opened a PR. It passes unit tests. Happy to implement a different solution if you prefer.
Bump, in case you missed this
Apologies - was waiting to do it all together with v0.7.0, which probably wasn't necessary. Thank you for doing this.
Thank you!
Right now there is one public header:
include/Clarabel
. This header conditionally includes either the C interface or the C++ interface depending on whether__cplusplus
is defined.My application is C++ but I'm using Clarabel through cvxpygen, which code-generates a convex problem and an interface to various solvers. Cvxpygen uses the C interface to Clarabel.cpp, but when I include the cvxpygen headers it into my C++ application,
include/Clarabel
picks up that I'm a C++ program and includes the C++ interface. This causes a conflict.RIght now I have a workaround where I rewrite
include/Clarabel
to only ever use the C interface, but I think a better solution would be to have a C headerinclude/Clarabel.h
and a C++ headerinclude/Clarabel
.