Gcc undefined reference (ld) error

Ubuntu 21.04, Unmatched

/usr/bin/ld: /home/ubuntu/Desktop/test/./source_c/fxpln.c:2000: undefined reference to ceil
and same error for exp2, floor, log2, pow

#include <math.h> is in the file fxpln.c (in source_c) and -lm is in gcc command


src = $(wildcard ./source_c/*.c)
ln_make: equ.s ln.s tool.s $(src)
gcc -I./source_c -g -lm -o ln equ.s ln.s tool.s $(src)

Any help willbe greatly appreciate.

-lm needs to come after the things that use it, not before

Yes. Put -lm at the end of the gcc command line solve the problem.
Thank a lot.