Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 2.95.3 20010315 (release) OS: Solaris Trying to compile kdetoys on my Solaris 8 x86 box breaks with: source='weatherservice.cpp' object='weatherservice.o' libtool=no \ depfile='.deps/weatherservice.Po' tmpdepfile='.deps/weatherservice.TPo' \ depmode=gcc /bin/ksh ../admin/depcomp \ g++ -pipe -DHAVE_CONFIG_H -I. -I. -I.. -I/vol/kde-cvs/include -I/vol/qt-3.2.3/include -I/vol/local/include -I/vol/graphics/include -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 -c -o weatherservice.o `test -f 'weatherservice.cpp' || echo './'`weatherservice.cpp weatherservice.cpp: In method `class QStringList WeatherService::findStations(float, float)': weatherservice.cpp:227: warning: unused parameter `float lon' weatherservice.cpp:227: warning: unused parameter `float lat' weatherservice.cpp: In method `class QString WeatherService::sunRiseTime(const QString &)': weatherservice.cpp:235: parse error before `1' weatherservice.cpp:240: request for member `computeRiseTime' in `1', which is of non-aggregate type `int' weatherservice.cpp: In method `class QString WeatherService::sunSetTime(const QString &)': weatherservice.cpp:249: parse error before `1' weatherservice.cpp:254: request for member `computeSetTime' in `1', which is of non-aggregate type `int' make[3]: *** [weatherservice.o] Error 1 make[3]: Leaving directory `/vol/src/kde/cvs/kdetoys/kweather' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/vol/src/kde/cvs/kdetoys/kweather' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/vol/src/kde/cvs/kdetoys' make: *** [all] Error 2 Obviously, it isn't a good idea to name objects "sun", at least on a Sun platform... ;-)
Created attachment 3802 [details] patch for kdetoys/kweather/weatherservice.cpp Applying the attached patch resolved this issue for me.
Subject: kdetoys/kweather CVS commit by mueller: sun is preprocessor #define on sunos CCMAIL: 70942-done@bugs.kde.org M +5 -5 weatherservice.cpp 1.30 --- kdetoys/kweather/weatherservice.cpp #1.29:1.30 @@ -233,10 +233,10 @@ QStringList WeatherService::findStations QString WeatherService::sunRiseTime(const QString &stationID) { - Sun sun; + Sun thesun; QString latitude = stationDB->stationLatitudeFromID(stationID); QString longitude = stationDB->stationLongitudeFromID(stationID); - QTime rise_time = sun.computeRiseTime(latitude, longitude); + QTime rise_time = thesun.computeRiseTime(latitude, longitude); kdDebug(12006) << "rise time: " << rise_time << endl; @@ -247,10 +247,10 @@ QString WeatherService::sunRiseTime(cons QString WeatherService::sunSetTime(const QString &stationID) { - Sun sun; + Sun thesun; QString latitude = stationDB->stationLatitudeFromID(stationID); QString longitude = stationDB->stationLongitudeFromID(stationID); - QTime set_time = sun.computeSetTime(latitude, longitude); + QTime set_time = thesun.computeSetTime(latitude, longitude); kdDebug(12006) << "set time: " << set_time << endl;