Error: undefined reference to `__errno'
Hello all,
I am currently using a STM32L4.When I simply want to call the function log() or log10() like this:
Value = log10((double) Value));
The issue is that if I do this call I get the following error when I am compiling the project:
’’‘Building target: Project.elf’
‘Invoking: MCU GCC Linker’
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -T”../STM32L486VGTx_FLASH.ld” -Wl,-Map=output.map -Wl,- -gc-sections -lm -o “Project.elf” @”objects.list” --
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libm.a(lib_a-w_log10.o): In function `log10’:
w_log10.c:(.text.log10+0x8a): undefined reference to `__errno’
w_log10.c:(.text.log10+0xb2): undefined reference to `__errno’
w_log10.c:(.text.log10+0xee): undefined reference to `__errno’
collect2.exe: error: ld returned 1 exit status
make: *** Project.elf Error 1’’
This problem doesn’t appear when I am using other Math functions like cos() or pow()... What did I do wrong ?
Best regards,
Florian