kthohr / optim

OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions

Home Page:https://optimlib.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile as a static library?

jussihi opened this issue Β· comments

Hello,

Thank you for the library, it works like a charm! πŸ‘

Can the library be compiled and linked statically to my program?

Not out of the box--you would need to modify configure and Makefile to do this. But perhaps a simpler approach would be to generate a header-only version of the library (./configure --header-only-version) and include the headers with your program (but at the likely cost of longer compile times and larger binaries).

Not out of the box--you would need to modify configure and Makefile to do this. But perhaps a simpler approach would be to generate a header-only version of the library (./configure --header-only-version) and include the headers with your program (but at the likely cost of longer compile times and larger binaries).

Thanks for confirming! I've been using --header-only-version, and will use it in the future.

I will close this issue as my question has been answered.

Once again, great library! Thanks a lot for the time and effort you've put in it!