L1823 linker error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

L1823 linker error

Jump to solution
1,547 Views
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

Labels (1)
Tags (1)
0 Kudos
1 Solution
586 Views
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

View solution in original post

0 Kudos
3 Replies
587 Views
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 Kudos
586 Views
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 Kudos
586 Views
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 Kudos