#718 errors when including math.h & adding -ansi in compile line

component_package
closed-fixed
Danny Smith
gcc (462)
2005-02-07
2005-02-07
paul
No

i tried to compile a file that includes <math.h>

the compile line is the following:

g++ -c source_file.c -Wall -ansi

when i remove -ansi i no longer get errors.

these are the errors.

In file included from
d:/programs/mingw/include/c++/3.2.3/bits/locale_facets.
tcc
:41,
from
d:/programs/mingw/include/c++/3.2.3/locale:46,
from
d:/programs/mingw/include/c++/3.2.3/bits/istream.tcc:3
7,
from
d:/programs/mingw/include/c++/3.2.3/istream:297,
from
d:/programs/mingw/include/c++/3.2.3/fstream:45,
from textures.hh:7,
from ms3d.hh:6,
from 3ds.hh:5,
from 3ds.cc:1:
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::acos(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:99:
`::acosf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::acos(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:109:
`::acosl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::asin(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:119:
`::asinf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::asin(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:127:
`::asinl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::atan(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:137:
`::atanf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::atan(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:145:
`::atanl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::atan2(float,

float)':
d:/programs/mingw/include/c++/3.2.3/cmath:155:
`::atan2f' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::atan2(long double, long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:164:
`::atan2l' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::ceil(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:175:
`::ceilf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::ceil(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:183:
`::ceill' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::cosh(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:203:
`::coshf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::cosh(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:211:
`::coshl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::exp(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:221:
`::expf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::exp(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:229:
`::expl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::floor(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:249:
`::floorf' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::floor(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:257:
`::floorl' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::fmod(float,
float)':
d:/programs/mingw/include/c++/3.2.3/cmath:267:
`::fmodf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::fmod(long double, long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:276:
`::fmodl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::frexp(float,

int*)':
d:/programs/mingw/include/c++/3.2.3/cmath:287:
`::frexpf' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::frexp(long double, int*)':
d:/programs/mingw/include/c++/3.2.3/cmath:295:
`::frexpl' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::ldexp(float,

int)':
d:/programs/mingw/include/c++/3.2.3/cmath:306:
`::ldexpf' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::ldexp(long double, int)':
d:/programs/mingw/include/c++/3.2.3/cmath:315:
`::ldexpl' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::log(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:326:
`::logf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::log(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:334:
`::logl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::log10(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:344:
`::log10f' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::log10(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:352:
`::log10l' undeclared (first use

here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::modf(float,
float*)':
d:/programs/mingw/include/c++/3.2.3/cmath:362:
`::modff' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::modf(long double, long double*)':
d:/programs/mingw/include/c++/3.2.3/cmath:376:
`::modfl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::pow(float,
float)':
d:/programs/mingw/include/c++/3.2.3/cmath:401:
`::powf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::pow(long double, long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:410:
`::powl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::sinh(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:443:
`::sinhf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::sinh(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:451:
`::sinhl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float std::tan(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:471:
`::tanf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::tan(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:479:
`::tanl' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `float
std::tanh(float)':
d:/programs/mingw/include/c++/3.2.3/cmath:489:
`::tanhf' undeclared (first use
here)
d:/programs/mingw/include/c++/3.2.3/cmath: In
function `long double
std::tanh(long double)':
d:/programs/mingw/include/c++/3.2.3/cmath:497:
`::tanhl' undeclared (first use
here)
make: *** [3ds.o] Error 1

Discussion

  • Danny Smith
    Danny Smith
    2005-02-07

    Logged In: YES
    user_id=11494

    This bug has been fixed.
    Try with a newer version of mingw runtime.
    Danny

     
  • Danny Smith
    Danny Smith
    2005-02-07

    • status: open --> closed-fixed