Link Error _FUTRUNC

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

Link Error _FUTRUNC

Jump to solution
1,108 Views
tnriley
Contributor III

Getting the Error Message (CodeWarrior v5.1 Professional)

Link Error : L1822: Symbol _FUTRUNC in file c:\Users\........\ObjectCode\main.c.c is undefined.

The message above is generated when "make" is executed. _FUTRUNC does not exist in the program file. I was not getting this error previously, but it started showing up after I had made a multitude of changes to the code. Not sure where to start to locates the problem.

Please advise.

thanks,

Tim

0 Kudos
1 Solution
973 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Tim.

It looks like you did not link against the correct ANSI library._FUTRUNC need to be supported by floating library.

To fix that:
    - Create a new project using the wizard.
    - Make sure you specify you want to use floating point arithmetic in your application
      and specify whether you want to use 32-bit or 64 bit representation for double.
    - Insert your source files in the new project That should do it.

Hope this helps!
Anyway, if the above doesn't fully answer your, please contact me again.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
973 Views
tnriley
Contributor III

Jenny,

Thanks, but I can't send the source code and I am sure that just sending pieces will not have the desired effect. I was mainly curious as to how you knew the origin of _FUTRUNC. There didn't seem to be any clues in the error message that would point me to the location or clue me in to the fact that I needed a floating point library. What is the best way to look up these types of  error message /NXP?

Thanks for your help,

Tim 

0 Kudos
973 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Tim.

I don't know there is a document tells the way of how to know the origin of _FUTRUNC. this is just based on my years of support experience.

Normally the function start with "F" is included in floating library. then I check floating library files then I find _FUTRUNC in fconv.c

 

Best Regards.

Jennie Zhang

0 Kudos
973 Views
tnriley
Contributor III

Jennie,

Two points to add.

That may in fact be the case, but why did the code compile correctly for many iterations (over the span of a few weeks) then suddenly complain about not finding _FUTRUNC. There are no floating point calculations in the recent code mods that I made. I will try creating a new project as you said, but don't understand why I got the error when I did. It looks to me like I should have had that error from the very first compile. There are currently no floating point operations in my code with the unless integer division operations are considered as such (i.e. most generate a fractional result).

How do you know that _FUTRUNC needs the floating point library?

Sorry, I am new to CodeWarrior.

Thanks for your help,

Tim

0 Kudos
973 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Tim,

_FUTRUNC is defined in fconv.c, this file is composed in floating library .

To answer to your question of why your project needs _FUTRUNC, I need to check your project . Please send me your demo project thus I can check it directly from my side. Thanks.

Best Regards.

Jennie Zhang

0 Kudos
974 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Tim.

It looks like you did not link against the correct ANSI library._FUTRUNC need to be supported by floating library.

To fix that:
    - Create a new project using the wizard.
    - Make sure you specify you want to use floating point arithmetic in your application
      and specify whether you want to use 32-bit or 64 bit representation for double.
    - Insert your source files in the new project That should do it.

Hope this helps!
Anyway, if the above doesn't fully answer your, please contact me again.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos