codewarrior compiler issue

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

codewarrior compiler issue

跳至解决方案
597 次查看
vihaanred
Contributor III

Hi all,

 

i have found this strange problem with codewarrior compiler. My program is as follows

 

extern int i;

void test(int );

 

void main(void)

{

  test(i);

}

 

void test(int j)

{

  // do some logic

}

 

The program compiles without error. the program should have shown an error "i undefined". Can someone please explain me what is the solution for it?

 

Satya

标签 (1)
标记 (2)
1 解答
497 次查看
kef2
Senior Contributor V

You should mention what particular CW version you are talking about.

It is CW for S12(X), then you should see some  L1823 warnings, object created by default. To prevent this, you need to turn L1823 warning into error by adding  -WmsgSe1823 to the linker command line string setting.

在原帖中查看解决方案

2 回复数
498 次查看
kef2
Senior Contributor V

You should mention what particular CW version you are talking about.

It is CW for S12(X), then you should see some  L1823 warnings, object created by default. To prevent this, you need to turn L1823 warning into error by adding  -WmsgSe1823 to the linker command line string setting.

497 次查看
vihaanred
Contributor III

sorry for not being very clear about my question. But i think it should have been enabled by default because i thought it is a standard.

0 项奖励
回复