undefined reference to `__sync_add_and_fetch_4'

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

undefined reference to `__sync_add_and_fetch_4'

1,518 Views
paulyang
Contributor I

I am working on MKL26Z128VLH4 with CW 10.6.

However, I got the following error in linker

undefined reference to `__sync_add_and_fetch_4'

undefined reference to `__sync_val_compare_and_swap_4'

Does gcc provide these functions?

Labels (2)
0 Kudos
3 Replies

571 Views
Paul_Tian
NXP Employee
NXP Employee

Hi, Paul

Would you please upload your project? I would like to check it for you.

Best Regards

Paul

0 Kudos

571 Views
paulyang
Contributor I

I have attached a test project.

It calls __sync_add_and_fetch() in main.c. This function is provided by gcc.

0 Kudos

571 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Paul Yang:

I guess you could not resolve the issue. Sorry about that.

:smileyinfo: Just for reference for anyone interested, those are “built-in” functions provided by GCC. However CodeWarrior comes with a customized version of GCC developed by FSL + ARM and since those are processor specific functions then I think they are not available for Cortex-M processors.


Regards!

Jorge Gonzalez

0 Kudos