| Summary: | Compile error on Solaris 2.9 in gvscrollpixmapview.cpp | ||
|---|---|---|---|
| Product: | [Applications] gwenview | Reporter: | Bernd Kuhls <bernd.kuhls> |
| Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Solaris | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Bernd Kuhls
2005-02-18 16:51:04 UTC
CVS commit by lunakl: math.h for round() BUG: 99716 M +1 -0 gvscrollpixmapview.cpp 1.135 --- kdeextragear-1/gwenview/src/gvscrollpixmapview.cpp #1.134:1.135 @@ -21,4 +21,5 @@ Foundation, Inc., 59 Temple Place - Suit #include <assert.h> +#include <math.h> // Qt Your patch does not solve the problem here because round() is not defined in math.h on Solaris: if /bin/bash ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -I/usr/local/KDE-3.4.0_CVS/include -I/usr/local/qt-050201/include -D_LARGEFILE64_SOURCE -DQT_THREAD_SUPPORT -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION-MT gvscrollpixmapview.lo -MD -MP -MF ".deps/gvscrollpixmapview.Tpo" \ -c -o gvscrollpixmapview.lo `test -f 'gvscrollpixmapview.cpp' || echo './'`gvscrollpixmapview.cpp; \ then mv -f ".deps/gvscrollpixmapview.Tpo" ".deps/gvscrollpixmapview.Plo"; \ else rm -f ".deps/gvscrollpixmapview.Tpo"; exit 1; \ fi gvscrollpixmapview.cpp: In member function `int GVScrollPixmapView::Private::imageToWidgetX(int) const': gvscrollpixmapview.cpp:228: error: `round' undeclared (first use this function) gvscrollpixmapview.cpp:228: error: (Each undeclared identifier is reported only once for each function it appears in.) gvscrollpixmapview.cpp: In member function `int GVScrollPixmapView::Private::imageToWidgetY(int) const': gvscrollpixmapview.cpp:233: error: `round' undeclared (first use this function) gvscrollpixmapview.cpp: In member function `int GVScrollPixmapView::Private::widgetToImageX(int) const': gvscrollpixmapview.cpp:248: error: `round' undeclared (first use this function) gvscrollpixmapview.cpp: In member function `int GVScrollPixmapView::Private::widgetToImageY(int) const': gvscrollpixmapview.cpp:253: error: `round' undeclared (first use this function) make[3]: *** [gvscrollpixmapview.lo] Error 1 Probably you have to use floor()
and maybe to know if you are compiling under linux
use the __linux__ macro but i don't know if it is
only for gcc.
~ [56]> man floor
NAME
floor - floor function
SYNOPSIS
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double floor(double x);
DESCRIPTION
The floor() function computes the largest integral value not
greater than x.
RETURN VALUES
Upon successful completion, floor() returns the largest
integral value not greater than x, expressed as a double.
If x is NaN, NaN is returned.
ERRORS
No errors will occur.
USAGE
The integral value returned by floor() as a double might not
be expressible as an int or long int. The return value
should be tested before assigning it to an integer type to
avoid the undefined results of an integer overflow.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Seems like Adrian De Groot fixed this bug. Can you check if the current CVS works for you? If you can't use the CVS version, can you try to replace the round() call with rint() and tell us if it fixes the problem? Yep, original snapshot 050222 compiles now, thanks! |