I need to use the floorf() function defined in Math.h and while I can compile the module where this is used successfully in my XE4 project, I receive this error when linking:
[ilink32 Error] Error: Unresolved external '_floorf' referenced from <myfilename>.OBJ [ilink32 Error] Error: Unable to perform link
This makes no sense - the compiler obviously knows where the function is declared as it opens Math.h when I control-click on the floorf() function. and I've included #include in the .cpp file. What do I need to get this working? I really need to use this standard math function.
Linking with math library is not enabled by default in some compilers.
I use BDS2006 so this may not help but:
floor()
instead of floorf()
float(floor(float(x)));
::floor()
) ;
, {
, }
, };
? especially in struct
/ class
/ namespace
#define
s ?
#define
s that collide with math internal compilation tokens?
_math
, _floor
... Draw()
functions with collision with internal TForm::Draw
draw()
and you will be fine unless you are bound to some naming scheme My bet is the point 6 saw it many many times back in my teaching times
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.