coin-or / CyLP

A Python interface to CLP, CBC, and CGL to solve LPs and MIPs.
Other
182 stars 69 forks source link

Cbc binary version to use? #167

Open HuangRicky opened 2 years ago

HuangRicky commented 2 years ago

I have a simple question: in CyLP documentation, it says: Cbc. The version should be 2.10 (recommended)

is that still the case or we can use 2.10.8 binary to build CyLP? thank you.

tkralphs commented 2 years ago

Any release in the 2.10 stable series should work fine (modulo possible bugs in earlier releases). So yes, 2.10.8 should be OK.

HuangRicky commented 2 years ago

When I downloaed Cbc github release 2.10.8 windows x86_64 msvc 16 md, I got this Static vs MD Dynamic mismatch. seems MSVC lib is dynamic?

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in IClpPrimalColumnPivotBase.obj Creating library build\temp.win-amd64-cpython-311\Release\cylp\cpp\CyCl

HuangRicky commented 2 years ago

FYI: i'm using VS 2019 built tools

HuangRicky commented 2 years ago

Good news, i found adding '/MT' to the compile args works:

else:

Assuming Windows

extra_link_args = []
extra_compile_args += ['/EHsc', '/MT']

does it mean that the release file msvc v16 - md is actually MT instead of MD?

HuangRicky commented 2 years ago

Any release in the 2.10 stable series should work fine (modulo possible bugs in earlier releases). So yes, 2.10.8 should be OK.

Thank you Ted, please see my reply above. Seems CBC's release is MT instead of MD? I have to change CyLP's setup.py to /MT to make it work.

The root cause is that Python 3.11 is released (rc2 now). Would you mind compile and upload to Pypi website the latest wheels for Windows and Linux? Thank you!