Good question… If you run mbed compile -v you can see the includes path (e.g. ./BUILD/disco_f769ni/GCC_ARM/.includes_375c138916cf9dfd2c73b8722800d319.txt). Moving the fact folder all the way back would help.
But I’m not sure if we have a ‘nice’ way of doing this, other than running g++ and ld yourself.
Yeah, you can take Jan’s advice OR rename the function inside your math.h such that it does not conflict with the std math library’s. Then it will definitely pick it up. Additionally, this is a compiler problem, not mbed-cli Though, mbed-cli will invoke the compiler for you.