Link Error: L1822

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

Link Error: L1822

8,019 Views
SSK
Contributor I

Hello Forum members,

I am using MC9S12GC32CPB16 in one of my projects. I am using Codewarrior 4.6 build 6345. I am using Processor Expert feature for my project coding. While building my complete code, I am getting following linker error:

Link Error   : L1822: Symbol _FUFLOAT in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined 

Link Error   : L1822: Symbol _FADD in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined 

Link Error   : L1822: Symbol _FMUL in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined 

Link Error   : L1822: Symbol _FDIV in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined 

Link Error   : L1822: Symbol _FCMP in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined 

Link Error   : L1822: Symbol _FSFLOAT in file ..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined

Link Error   : L1822: Symbol _FSUB in file

..\Projekt\MyProj_Data\P&E_Multilink_CyclonePro\ObjectCode\Measure.c.o is undefined

Link Error   : Link failed

If I compile the same file individually, it is error free. These symbols are not present in my code files. Where do I need to look to remove this error? Could you people please clarify my error?

Thanks in advance.

Labels (1)
Tags (1)
0 Kudos
Reply
6 Replies

2,326 Views
CrasyCat
Specialist III
Hello
 
You probably did not specify you are going to use floating point operation when you have created your project.
 
Look at this thread for instruction on how to fix that.
 
The error messages are generated by the linker, so you can compile each source file separately without problem.
That is normal.
 
CrasyCat
0 Kudos
Reply

2,326 Views
SSK
Contributor I
Thank you very much for your kind reply.
 
I have not configured my project for Floating point calculations. I have also checked the thread provided by you for this. But I am not able to locate the option -D__NO_FLOAT__ from compiler command line and add floating point format option (if needed) and also to locate the ansi library file. Where these settings are to be done? Using compiler settings -> Target Settings panel->compiler for hcs12->Options button->Code Generation tab-> Float 32bit or 64 bit - is this the correct way to do the same? Where to replace the library and which one?
 
Creating new project will be a bigger task as Processor expert is used widely.
 
Thanks in advance
0 Kudos
Reply

2,326 Views
CrasyCat
Specialist III
Hello
 
Looking into the panel Target Settings panel->compiler for hcs12 there is an edit box called "Command Line Arguments". This is where you find the -D__NO_FLOAT that you need to remove.
 
For info around floating point format, look in the Compiler for HC12 manual for option -Cf.
 
For info on which ansi library files to use, look into {Install}\lib\hc12c\readme.txt file
 
CrasyCat 
0 Kudos
Reply

2,326 Views
Motoman
Contributor I
 Hi All,

This is with respect to the previous posts regarding the L1822 linkage error ,

I am hitting the error copied below

"L1822: Symbol f__8cDocucamFPKFSc in file c:\documents and settings\01970704 20071108\screenfix\docus_data\p&e\objectcode\class_alphanumeric.cpp.o is undefined" .

I am not sure what FPKFSc pertains to and how to to add it into the library.

I am using CW version 2.0. I guess for me to alter the Compiler Settings, it is Edit >> P&E Settings >> Compiler for HCS12 >> Options. In Options, there is a window for "Code Generation" and I guess this is where we change the compiler settings by selecting the checkboxes that we require for the project.

Is my understanding correct on the way to change compiler option settings ? Could you please confirm ?

In the current project, I checked the compiler option for "float = IEEE32bit double = IEEE64bit guessing the error might be becasue I did not add FLOAT calculation option. However this is not the problem.
(Edit >> P&E Settings >> Compiler for HCS12 >>Options >> Code Generation)

Looking forward to potential solutions

Thanks,
0 Kudos
Reply

2,326 Views
CompilerGuru
NXP Employee
NXP Employee
I doubt that this error message has anything to do with the original topic of this thread, using floating point.
Changing the options will probably not help.
Instead I guess this f function (f::cDocucam?) just is not defined, or? Is there a definition? The FPKFSc name part encodes additional arguments of f, I would hope finding f should not be too dificult (or otherwise use longer names :smileyhappy: ).

Daniel
0 Kudos
Reply

2,326 Views
Motoman
Contributor I
Hi,

Thanks for the above message, well I think the post from Daniel might have struck a nerve.

This is the STRING_SEG pragma declaration and the function call I that was coded in the class Docucam.cpp.


#pragma STRING_SEG __PPAGE_SEG CONST_STRING
       char* str1 = "Good Morning";
       void far fun_string(char* );
   #pragma STRING_SEG DEFAULT
   
   fun_string ( "How are you" )  ;         

It is when I add the fun_string( "How are you" ) in the code that I get the linkage error. I defined fun_string function prototype in the respective .h file but that doesn't seem to be the fix.

Waiting for responses.

Thanks,
0 Kudos
Reply