Hello,
I am working with CodeWarrior v5.7.0, Build 2264 for Coldfire processor MCF512x.
My problem is that, I am not able to use the "fdlibm.h" file in any project with this version of codewarrior.
I get errors like,
Error : ';' expected
fdlibm.h line 43 extern _INT32 signgam; /*- cc 020130 -*/
Error : ';' expected
fdlibm.h line 94 extern _INT32 matherr __P((struct exception *)); /*- cc 020130 -*/
and etc etc.. about 17 similar errors.
The fact that the compiler is griping about a semicolons is a hint that some macro or other symbol definition is missing. There might be another header file you need to include. I would look at the output of the preprocessor to get a better idea of where things are going wrong.
---Tom
Hello,
Thank you.
I did what you suggested, and i found that the header 'cmath' is unable to access 'math_api.h'.
The include for math_api.h is under the conditional statement in the file cmath
#if _MSL_FLOATING_POINT && !defined(_MSL_NO_MATH_LIB) blah blah blah blah etc etc #include <math_api.h> etc etc #endif
The defintions for the above macros are provided in 'ansi_prefix.CF.size.h' as below,
#if !(__COLDFIRE__ == 0x4080 && !__option(fp_library)) #define _MSL_FLOATING_POINT 0 #define _MSL_NO_MATH_LIB 1 #endif
I tried defining '_MSL_FLOATING_POINT' to 1 and '_MSL_NO_MATH_LIB' as '0' and rebuilt the C-library.
Still, no effect.
The only thing that seems to work is to place the include statement for 'math_api.h' outside the #if statement in the file 'cmath', but that doesnt seem like a good thing to do.
Any suggestions?
-Bhavya
If memory serves, the Targeting ColdFire manual, located in the Help folder of the CodeWarrior installation folder, has information on how to build the libraries with different features, such as with/without floating point support, and with/without console I/O.
---Tom