with gcc4 it fails: i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.5/include -I/usr/qt/3/include -I. -I/usr/kde/3.5/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O3 -mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -ffast-math -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -fexceptions -c -o kactiveobjectproxy.o `test -f 'kactiveobjectproxy.cpp' || echo './'`kactiveobjectproxy.cpp i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.5/include -I/usr/qt/3/include -I. -I/usr/kde/3.5/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O3 -mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -ffast-math -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -fexceptions -c -o messageformatter.o `test -f 'messageformatter.cpp' || echo './'`messageformatter.cpp msgsender.h:45: error: ‘newSender’ declared as a ‘virtual’ field msgsender.h:45: error: expected ‘;’ before ‘(’ token msgsender.h:47: error: ‘newMyselfSender’ declared as a ‘virtual’ field msgsender.h:47: error: expected ‘;’ before ‘(’ token make[2]: *** [messageformatter.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/ksms-0.1.2.4/work/ksms-0.1.2/ksms' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/ksms-0.1.2.4/work/ksms-0.1.2' make: *** [all] Error 2 !!! ERROR: app-mobilephone/ksms-0.1.2.4 failed. Call stack: ebuild.sh, line 1894: Called dyn_compile ebuild.sh, line 941: Called src_compile ebuild.sh, line 1609: Called kde_src_compile kde.eclass, line 104: Called kde_src_compile 'compile' kde.eclass, line 221: Called kde_src_compile 'all' 'myconf' 'configure' !!! died running emake, kde_src_compile:make !!! If you need support, post the topmost build error, and the call stack if relevant. public: struct Factory : public KShared { virtual MsgSender* newSender( MsgSenderContainer& container, const QString& phoneNumber ) = 0; virtual MsgSender* newMyselfSender( MsgSenderContainer& container ) = 0; virtual ~Factory() = 0; }; persanally i don't know how to patch (ok...i can remove the virtual...but..) because i never saw a struct usage like that.
A struct cannot have virtual members, not to mention virtual pure members. Please make (and test) a patch that defines Factory as a class (class Factory : public KShared).
someone with a =gcc-4* installed on his/her machine, please help me with this.
> A struct cannot have virtual members, not to mention virtual pure members. Erm. No. A struct can have anything a class can have.
Created attachment 80728 [details, diff] gcc-4.1 patch This should fix it.
(In reply to comment #3) > > A struct cannot have virtual members, not to mention virtual pure members. > > Erm. No. A struct can have anything a class can have. True. Years of good practice can create your own reality. Patch has been applied to ksms-0.1.2.4.
i confirm it's ok. thanks