我在Qt構建中遇到同樣的錯誤。
我添加插槽信號從QProcess中完成 - 在DOCO上說:
void QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus)
我的代碼:
freesound.h
void slotPreviewFinished(int exitCode, QProcess::ExitStatus exitStatus);
freensound。 cpp
m_previewProcess = new(Qprocess);
connect (m_previewProcess ,SIGNAL (finished(int , QProcess::ExitStatus)),this,SLOT(slotPreviewFinished(int , QProcess::ExitStatus)));
void slotPreviewFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qDebug()<<"// slotPreviewFinished: "<<exitCode;
}
編譯上面生成的: /home/ttguy/kdenlive/kdenlive_git/build-kdenlive-Desktop-Default/src/moc_freesound.cpp:121:error:未定義引用`FreeSound :: slotPreviewFinished(int,QProcess ::退出狀態)」
而且修復是我的前綴執行slotPreviewFinished與Freesound上::
void FreeSound::slotPreviewFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qDebug()<<"// slotPreviewFinished: "<<exitCode;
}
這似乎不是足夠的信息真的。如果你評論你的連接語句,錯誤甚至會消失嗎? – dborba 2009-07-15 20:02:05