D
Darren L. Weber
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()
The section of code, among others, that has this error is:
void im2avi_t::update_image_width(bool ignore_aspect)
{
// update class variable
image_width = (int)main_window->im_width_input->value();
// update modulus ui elements
main_window->wm4_output->value(image_width % 4);
main_window->wm8_output->value(image_width % 8);
main_window->wm16_output->value(image_width % 16);
// update height if allowed
if (!ignore_aspect && main_window->constrain_aspect_check->value())
{
main_window->im_height_input->value(rint(image_width /
image_aspect_ratio));
update_image_height(true);
}
// we only update the image aspect ratio if the user has told us NOT
to constrain it, but the programmer has NOT
// told us to ignore it, else we get strange interaction when width
changes affect height and vice versa
if (!main_window->constrain_aspect_check->value() && !ignore_aspect
&& image_width > 0 && image_height > 0)
{
update_image_aspect_ratio((float) image_width / (float)
image_height);
}
}
How do I fix this error related to rint()
Thanks in advance, Darren
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()
The section of code, among others, that has this error is:
void im2avi_t::update_image_width(bool ignore_aspect)
{
// update class variable
image_width = (int)main_window->im_width_input->value();
// update modulus ui elements
main_window->wm4_output->value(image_width % 4);
main_window->wm8_output->value(image_width % 8);
main_window->wm16_output->value(image_width % 16);
// update height if allowed
if (!ignore_aspect && main_window->constrain_aspect_check->value())
{
main_window->im_height_input->value(rint(image_width /
image_aspect_ratio));
update_image_height(true);
}
// we only update the image aspect ratio if the user has told us NOT
to constrain it, but the programmer has NOT
// told us to ignore it, else we get strange interaction when width
changes affect height and vice versa
if (!main_window->constrain_aspect_check->value() && !ignore_aspect
&& image_width > 0 && image_height > 0)
{
update_image_aspect_ratio((float) image_width / (float)
image_height);
}
}
How do I fix this error related to rint()
Thanks in advance, Darren