Connecting Tech Pros Worldwide Help | Site Map

How to include the C extensions?

Member
 
Join Date: Jul 2008
Posts: 62
#1: Sep 3 '08
Hi - I want to use the log2f() and log2l() functions in math.h and I found that they are actually part of a C99 extension...but how do I include this math extension?

Also - is there a way to turn every extension to "on"?

Thanks!
Expert
 
Join Date: Sep 2007
Posts: 856
#2: Sep 3 '08

re: How to include the C extensions?


If you're using gcc, compile with the -c99 flag. If you're using another compiler, check its documentation to see if this is possible and how to do it.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#3: Sep 3 '08

re: How to include the C extensions?


It depends whether or not your compiler implementation conforms to the C99
Standard (it's not an extension). Check your manuals.

kind regards,

Jos
Reply