cancel
Showing results for 
Search instead for 
Did you mean: 

emWin library problem

pcu
Associate II
Posted on November 27, 2013 at 08:30

Hello,

I tried to build on Atollic the precompiled package around the emWin graphical lib(

AN4323

).

I build for STM322xG-EVAL, but I get two errors:

c:/program files (x86)/atollic/truestudio for arm pro 3.3.0/armtools/bin/../lib/gcc/arm-atollic-eabi/4.6.2/../../../../arm-atollic-eabi/lib/thumb/armv7-m\libm.a(lib_a-w_sqrt.o): In function `sqrt':

w_sqrt.c:(.text.sqrt+0x7a): undefined reference to `__errno'

w_sqrt.c:(.text.sqrt+0x86): undefined reference to `__errno'

I have no idea how to resolve this.

Thank you,

Pierre

2 REPLIES 2
Posted on November 27, 2013 at 10:47

__errno is part of the C runtime library, not sure how Atollic handles it but you probably need to include LIBC along with LIBM. One way might be to #include <math.h>, <stdlib.h>, or <sys/errno.h>, etc into your application.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
pcu
Associate II
Posted on November 29, 2013 at 10:07

yes If I add libm in the linker settings, it is better.

Thank you.