undefined reference to `__sync_add_and_fetch_4'

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

undefined reference to `__sync_add_and_fetch_4'

1,846 次查看
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?

标签 (2)
0 项奖励
回复
3 回复数

899 次查看
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 项奖励
回复

899 次查看
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 项奖励
回复

899 次查看
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 项奖励
回复