I'm trying to build libccd in Windows using MSVC++. Everything seems to work fine except the MS compiler doesn't have any C99 features and is thus missing fmin/fminf/fmax/fmaxf. If I just change CCD_FMIN and CCD_FMAX to inline functions:
__inline ccd_real_t CCD_FMAX(ccd_real_t x, ccd_real_t y) { return x < y ? y : x; }
__inline ccd_real_t CCD_FMIN(ccd_real_t x, ccd_real_t y) { return x < y ? x : y; }
then the library compiles fine (please ignore the weird __inline syntax, I'm still trying to figure out a portable way to specify inline). I'm not suggesting this is the ideal solution, but I think a similar change is worthwhile to get the library to compile on Windows without modification.
Hi,
I'm trying to build libccd in Windows using MSVC++. Everything seems to work fine except the MS compiler doesn't have any C99 features and is thus missing fmin/fminf/fmax/fmaxf. If I just change CCD_FMIN and CCD_FMAX to inline functions:
__inline ccd_real_t CCD_FMAX(ccd_real_t x, ccd_real_t y) { return x < y ? y : x; } __inline ccd_real_t CCD_FMIN(ccd_real_t x, ccd_real_t y) { return x < y ? x : y; }
then the library compiles fine (please ignore the weird __inline syntax, I'm still trying to figure out a portable way to specify inline). I'm not suggesting this is the ideal solution, but I think a similar change is worthwhile to get the library to compile on Windows without modification.