stephenbeckr / L-BFGS-B-C

L-BFGS-B, converted from Fortran to C, with Matlab wrapper
BSD 3-Clause "New" or "Revised" License
108 stars 56 forks source link

-lm option should be put in the end of the gcc command #2

Closed antiquity closed 9 years ago

antiquity commented 9 years ago

Dear, Dr. Becker,

I have some problem in compiling the code under src directory. It warns me by

undefined reference to `sqrt'

It should be the problem of linking with math library. Although CFLAG has this option, it is not at the end of the gcc command, which causes problem here in linux.

stephenbeckr commented 9 years ago

Thanks for noticing. I adjusted the Makefile in src to put -lm at the end of the line. Please let me know if this fixes the issue for you.

antiquity commented 9 years ago

Thanks. That fixed my problem.