L1823 linker error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,019件の閲覧回数
NeilVP
Contributor II

I have successfully written a number of projects using CodeWarrior now and my latest project was working but now I am getting multiple L1823 errors. I understand what the error is and what it means but am at a loss to explain why I am getting the error. For example it looks as though the linker cannot see the mc9s08qe4.h file but it is in the file list, it is in the link order list and it is where the path says it should be. It also seems that the linker cannot see any of my .h files. Given that this project was compiling successfully my suspicion is that I have inadvertently managed to mess up a project setting.

Any suggestions as to how to fix would be gratefully received.

 

Many thanks

 

Neil

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,058件の閲覧回数
NeilVP
Contributor II

The solution was to rebuild the project from scratch.

New directory, new project but not using the option to "include these files" just copy and paste the .c and .h files from their original locations and the project compiled first go. Clearly the original project settings had been corrupted whether by me or gremlins I do not know.

 

Hope this helps someone.

 

Cheers

 

Neil

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,059件の閲覧回数
NeilVP
Contributor II

The solution was to rebuild the project from scratch.

New directory, new project but not using the option to "include these files" just copy and paste the .c and .h files from their original locations and the project compiled first go. Clearly the original project settings had been corrupted whether by me or gremlins I do not know.

 

Hope this helps someone.

 

Cheers

 

Neil

0 件の賞賛
返信
1,058件の閲覧回数
CrasyCat
Specialist III

Hello

 

Message  "L1823: External object <Symbol Name> in <File Name> created by default" notify that you only have external declaration for the specified object but no formal definition.

 

You need to place the variable definition (without extern modifier) in a .c source file.

 

Also note that per default L1823 is a warning. So this should not prevent you from linking your application.

 

CrasyCat

0 件の賞賛
返信
1,058件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Header files as mc9s08qe4.h typically only contain declarations, so I guess the issue here is that the corresponding *.c file (mc9s08qe4.c) is not added to the project.

 

Daniel

0 件の賞賛
返信