Array initialization to NULL throws Link Error

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

Array initialization to NULL throws Link Error

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

684件の閲覧回数
admin
Specialist II
With my development environment (Netburner NDDK Rel23_rc3 with wizard generated project), the compile is Ok.
0 件の賞賛
返信

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