undefined reference to __errno

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

undefined reference to __errno

1,568 Views
_bjs
Contributor III

Hello Please help:

I Added -(l)m for functions as roundf, fmaxf, 
Now i am getting the following error:

_bjs_0-1658226864973.png


I am not good with these side programming problems. What do i do to solve this?

I have added the following, this did not help:

#include "errno.h"

#define errno (*__error())
extern int * __error(void);

MCU linker is invoking:
arm-none-eabi-gcc -nostdlib -L"C:\Users\...

I am not familiar with what correct invoking is, arm-none-eabi-gcc I have seen before.

Is there some work around, adding some small-math-lib or something from github, anyone know?


0 Kudos
Reply
2 Replies

1,533 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @_bjs ,

Can you give example code?

 

Regards,

Jing

0 Kudos
Reply

1,529 Views
_bjs
Contributor III

I have solved this problem by moving from Redlib to Newlib.
The problem is difficult to create, on example projects i do not get the __errno issue.
Only on my final project, but i cannot share this easily.

0 Kudos
Reply