Array initialization to NULL throws Link Error

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

Array initialization to NULL throws Link Error

1,244 次查看
TVNAIDU
Contributor III

Trying to initialize array to NULL, gives Link error (Undefined : "__clear")

 

char ip_string[16] = {0};

 

anything wrong?. thanks.

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

680 次查看
admin
Specialist II
With my development environment (Netburner NDDK Rel23_rc3 with wizard generated project), the compile is Ok.
0 项奖励
回复

680 次查看
CompilerGuru
NXP Employee
NXP Employee

The compiler is using a runtime library function to clear this array. So you have to link with the proper library. Sorry I'm not knownig CF by heart, so basically I would recommend to check where __clear comes from in a default wizard generated project.

 

Daniel

0 项奖励
回复