[Qt-interest] compile error after class refactoring
Srdjan Todorovic
todorovic.s at googlemail.com
Thu May 14 11:30:29 CEST 2009
Hi
2009/5/14 Luca Ferrari <fluca1978 at infinito.it>:
> Hi,
> I've got a simple class that declares a couple of signals, and it worked.
> Today I moved some functions to a base class, making my class inheting from
> such base and the base inherits from QOBject (and uses the Q_OBJECT macro).
> But now the compiler produces an error when my class emits signals:
>
> signal.o: In function `Signal::emitSignals()':
> /mnt/disco2/sviluppo/qt/SigConsole/../SigConsole.src/signal.cpp:11: undefined
> reference to `Signal::integerSignal(int)'
Why would you need to refer to Signal::integerSignal(int) from within
Signal? Did you move a slot/signal called integerSignal() from Signal
to Base?
What do you have for line 11?
> /mnt/disco2/sviluppo/qt/SigConsole/../SigConsole.src/signal.cpp:14: undefined
> reference to `Signal::voidSignal()'
> signal.o: In function `Signal':
> /mnt/disco2/sviluppo/qt/SigConsole/../SigConsole.src/signal.cpp:3: undefined
> reference to `vtable for Signal'
> /mnt/disco2/sviluppo/qt/SigConsole/../SigConsole.src/signal.cpp:3: undefined
> reference to `vtable for Signal'
> collect2: ld returned 1 exit status
Perhaps re-run qmake to get all the moc files regenerated.
Srdjan
More information about the Qt-interest-old
mailing list