sh**********@comcast.net wrote:
Darren L. Weber wrote:
I am trying to compile a utility to create .avi files. See
http://cpbotha.net/im2avi
I'm working on Debian etch (a mix of testing/unstable).
dweber@dnlweber:~/im2avi-0.4$ g++ --version
g++ (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
When I try to compile, I am getting a lot of scope errors. I've fixed
a lot of them by just using std:: where it is missing. However, I
don't know a fix for this one:
im2avi_t.cxx: In member function 'void
im2avi_t::update_image_width(bool)':
im2avi_t.cxx:338: error: 'rint' was not declared in this scope
The program source named im2avi_t.cxx includes, among others:
#include <math.h // where I assume we get rint()
< snip >
How do I fix this error related to rint()
did you try :
#include <cmath>
and
std::rint()
??
Yes, more problems with that:
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:99:
error: '::acos' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:116:
error: '::asin' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:131:
error: '::atan' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:146:
error: '::atan2' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:162:
error: '::ceil' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:177:
error: '::cos' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:192:
error: '::cosh' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:207:
error: '::exp' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:222:
error: '::fabs' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:237:
error: '::floor' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:252:
error: '::fmod' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:262:
error: '::frexp' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:277:
error: '::ldexp' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:292:
error: '::log' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:307:
error: '::log10' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:322:
error: '::modf' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:341:
error: '::pow' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:363:
error: '::sin' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:378:
error: '::sinh' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:393:
error: '::sqrt' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:408:
error: '::tan' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.4/../../../../include/c++/4.0.4/cmath:423:
error: '::tanh' has not been declared
im2avi_t.cxx: In member function 'void
im2avi_t::update_image_width(bool)':
im2avi_t.cxx:339: error: 'rint' is not a member of 'std'
Should I switch to an older compiler? I wonder if these problems are
related to gcc4.0.4