Link error L1822 + uCOS-II

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

Link error L1822 + uCOS-II

跳至解决方案
3,492 次查看
nicolas
Contributor I
Hello,

I use codewarrior with a card with HC12 (mc9s12dt256).
I try to use uCOS-II on this card. For the moment, I try to compile the test file of uCOS for HC12. I try to compile it in codewarrior and view the results in the simulator of codewarrior.

My problem is the next :
- I have add the .h and the .c of uCOS in the lib folder of codewarrior
- I have not modify the test file
- When I compile the file, I have a lot of link errors L1822.
The errors are :
Link error : L1822 : Symbol OSInit in file C:\prj\test.c.o is undefined.

Someone can help me, because I search since 5 days and I don't progress.
Thanks for your help.

Nicolas
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,488 次查看
Alban
Senior Contributor II
Salut Nico,
 
Here are my two pence worth.
Your LINKER error means that you have included the new C-file properly in your test.c.
However, a symbol (= variable, array, constant... whatever) from uCOS is declared in its files but is not declared in test.c.
From the name of the symbol, I guess the function "OSInit" prototype need to be added as an extern in test.c for the LINKER to see the reference between the two files...
May be...
 
Bonne Chance,
Alban.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,489 次查看
Alban
Senior Contributor II
Salut Nico,
 
Here are my two pence worth.
Your LINKER error means that you have included the new C-file properly in your test.c.
However, a symbol (= variable, array, constant... whatever) from uCOS is declared in its files but is not declared in test.c.
From the name of the symbol, I guess the function "OSInit" prototype need to be added as an extern in test.c for the LINKER to see the reference between the two files...
May be...
 
Bonne Chance,
Alban.
0 项奖励
回复