undefined reference to __errno

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

undefined reference to __errno

1,569 次查看
_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 项奖励
回复
2 回复数

1,534 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @_bjs ,

Can you give example code?

 

Regards,

Jing

0 项奖励
回复

1,530 次查看
_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 项奖励
回复