Re: compile detection of powf, etc
- From: Jordan Abel <random832@xxxxxxxxx>
- Date: 30 Jan 2006 17:06:19 GMT
On 2006-01-30, Marco <prenom_nomus@xxxxxxxxx> wrote:
> Is there a standard way using the preprocessor to detect if a given C
> compiler/library environment provides the C99 <math.h> floating point
> functions such as:
>
> float powf(float x, float y);
> float sqrtf(float x);
> etc
>
> so we could "provide" these prototypes or not via our
>
> "xtra_math.h" file
>
> Note some C environments are incomplete and may define the C90 flag but
> still provide these functions. So I think we need to check each
> function.
>
> looking for any suggestions
>
> thanks
(semi-offtopic)
One way [this is highly system-specific - basically unix-only, and may
not be guaranteed even by the POSIX standard] would be to provide the
functions in a static library and link it after libm. If the link editor
finds it in libm, it won't take the one from your library.
static library
.
- References:
- compile detection of powf, etc
- From: Marco
- compile detection of powf, etc
- Prev by Date: Re: advantage of using typedefs
- Next by Date: Re: how to develop library ( .a and .so files) ! URGENT!!!
- Previous by thread: Re: compile detection of powf, etc
- Next by thread: how to develop library ( .a and .so files) ! URGENT!!!
- Index(es):