LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

C99 math functions

Solved!
Go to solution

Hello all yet again,

I'm trying to use the C99 math functions: nearbyint, round, exp2, cbrt, etc... But they don't seem to be defined in the CVI2013 header file.

I previously would compile them (with gcc) only if __STDC_HOSTED__ was defined, but it appears that, although it doesn't appear in the predefined options listed in the build options, this macro is now defined in CVI2013...

 

So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?

 

Note, the official test seems to be:

#if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

// C99 math functions present

#endif

0 Kudos
Message 1 of 3
(4,007 Views)
Solution
Accepted by topic author gdargaud

@gdargaud wrote:
So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?

Nobody said so..., see here

0 Kudos
Message 2 of 3
(4,002 Views)

Hah, knew I'd read that discussion somewhere. Depressing. By 2030 we'll all be using Go...

0 Kudos
Message 3 of 3
(3,987 Views)