undefined reference to `__sync_add_and_fetch_4'

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

undefined reference to `__sync_add_and_fetch_4'

1,776件の閲覧回数
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 返答(返信)

829件の閲覧回数
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 件の賞賛
返信

829件の閲覧回数
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 件の賞賛
返信

829件の閲覧回数
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 件の賞賛
返信