KardinalAI / coin_cbc

Rust bindings to the CoinOR CBC MILP Solveur using the C API.
MIT License
16 stars 14 forks source link

Locate static cbc libs on windows via CBC_ROOT #28

Closed Thell closed 1 year ago

Thell commented 1 year ago

This uses std::env to check for CBC_ROOT on windows family targets an use that path for the search path for cbc libraries as named in the coin-or Cbc releases for windows (mscvXX) builds and sets the link kind="static" for linking.

If CBC_ROOT is not found a cargo:warning is emitted instead of a panic so it won't interfere with any existing windows build work-arounds.

TeXitoi commented 1 year ago

I don't know windows compilation procedure. But as it is better than before and can't be worst, I'm OK to merge this.

I wait a bit if there is some review from the community. I'll merge it next week. Feel free to remind me if I forget by pinging me in this thread.

Thanks for the contribution!

NickHu commented 1 year ago

@Thell was this closed intentionally? I am quite interested in compiling for Windows with statically-linked Cbc

Thell commented 1 year ago

@Thell was this closed intentionally? I am quite interested in compiling for Windows with statically-linked Cbc

I was cleaning up repos in my account and thought that the pull request had the needed pieces. I didn't think about it closing the PR because I removed my branch.