出现如下问题,系统archlinux + kde
在包含自 SoundCore.cpp:1 的文件中:
SoundCore.h:5:18: 错误:Phonon:没有那个文件或目录
SoundCore.cpp:3:30: 错误:Phonon/AudioOutput:没有那个文件或目录
SoundCore.cpp:4:38: 错误:Phonon/BackendCapabilities:没有那个文件或目录
SoundCore.cpp:5:30: 错误:Phonon/MediaObject:没有那个文件或目录
SoundCore.cpp:6:30: 错误:Phonon/VideoWidget:没有那个文件或目录
SoundCore.cpp:7:23: 错误:Phonon/Path:没有那个文件或目录
In file included from SoundCore.cpp:1:
SoundCore.h:14: 错误:expected class-name before ‘{’ token
SoundCore.h:15: 错误:ISO C++ 不允许声明无类型的‘Q_OBJECT’
SoundCore.h:17: 错误:expected ‘;’ before ‘private’
SoundCore.h:32: 错误:‘Phonon’未声明
SoundCore.h:32: 错误:ISO C++ 不允许声明无类型的‘MediaObject’
SoundCore.h:32: 错误:expected ‘;’ before ‘*’ token
SoundCore.h:33: 错误:‘Phonon’未声明
SoundCore.h:33: 错误:ISO C++ 不允许声明无类型的‘AudioOutput’
SoundCore.h:33: 错误:expected ‘;’ before ‘*’ token
SoundCore.h:35: 错误:‘qint64’没有命名一个类型
SoundCore.h:36: 错误:‘qint64’没有命名一个类型
SoundCore.h:44: 错误:expected primary-expression before ‘void’
SoundCore.h:44: 错误:ISO C++ 不允许声明无类型的‘signals’
SoundCore.h:44: 错误:expected ‘;’ before ‘void’
SoundCore.h:52: 错误:expected ‘,’ or ‘...’ before ‘&’ token
SoundCore.h:52: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.h:53: 错误:‘qint64’未声明
SoundCore.h:55: 错误:expected `:' before ‘slots’
SoundCore.h:56: 错误:expected primary-expression before ‘void’
SoundCore.h:56: 错误:ISO C++ 不允许声明无类型的‘slots’
SoundCore.h:56: 错误:expected ‘;’ before ‘void’
SoundCore.h:60: 错误:‘qint64’未声明
SoundCore.h:62: 错误:‘qreal’未声明
SoundCore.h:64: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.h:64: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.h:65: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.h:65: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.h:66: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.h:66: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.h:67: 错误:‘qint64’未声明
SoundCore.h:68: 错误:expected `:' before ‘slots’
SoundCore.h:69: 错误:expected primary-expression before ‘void’
SoundCore.h:69: 错误:ISO C++ 不允许声明无类型的‘slots’
SoundCore.h:69: 错误:expected ‘;’ before ‘void’
SoundCore.h:72: 错误:‘Phonon’未声明
SoundCore.h:72: 错误:ISO C++ 不允许声明无类型的‘MediaObject’
SoundCore.h:72: 错误:expected ‘;’ before ‘*’ token
SoundCore.h:73: 错误:‘Phonon’未声明
SoundCore.h:73: 错误:ISO C++ 不允许声明无类型的‘AudioOutput’
SoundCore.h:73: 错误:expected ‘;’ before ‘*’ token
SoundCore.h:74: 错误:‘Phonon’未声明
SoundCore.h:74: 错误:ISO C++ 不允许声明无类型的‘Path’
SoundCore.h:74: 错误:expected ‘;’ before ‘m_audioOutPath’
SoundCore.cpp:12: 错误:隐式声明的‘SoundCore::SoundCore()’的定义
SoundCore.cpp:44: 错误:‘Phonon’未声明
SoundCore.cpp:44: 错误:expected constructor, destructor, or type conversion before ‘*’ token
SoundCore.cpp:49: 错误:‘Phonon’未声明
SoundCore.cpp:49: 错误:expected constructor, destructor, or type conversion before ‘*’ token
SoundCore.cpp:54: 错误:‘qint64’没有命名一个类型
SoundCore.cpp:59: 错误:‘qint64’没有命名一个类型
SoundCore.cpp: In member function ‘bool SoundCore::isMuted()’:
SoundCore.cpp:66: 错误:‘m_pAudioOut’在此作用域中尚未声明
SoundCore.cpp: At global scope:
SoundCore.cpp:69: 错误:变量或字段‘seek’声明为 void
SoundCore.cpp:69: 错误:‘qint64’在此作用域中尚未声明
SoundCore.cpp: In member function ‘bool SoundCore::isPlaying()’:
SoundCore.cpp:77: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:77: 错误:‘Phonon’未声明
SoundCore.cpp: In member function ‘bool SoundCore::isPause()’:
SoundCore.cpp:81: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:81: 错误:‘Phonon’未声明
SoundCore.cpp: In member function ‘bool SoundCore::isStop()’:
SoundCore.cpp:85: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:85: 错误:‘Phonon’未声明
SoundCore.cpp: In member function ‘void SoundCore::setMuted()’:
SoundCore.cpp:90: 错误:‘m_pAudioOut’在此作用域中尚未声明
SoundCore.cpp: At global scope:
SoundCore.cpp:93: 错误:变量或字段‘setVolume’声明为 void
SoundCore.cpp:93: 错误:‘qreal’在此作用域中尚未声明
SoundCore.cpp:98: 错误:变量或字段‘test’声明为 void
SoundCore.cpp:98: 错误:‘qint64’在此作用域中尚未声明
SoundCore.cpp:104: 错误:成员函数‘void SoundCore::play()’未在类‘SoundCore’中声明
SoundCore.cpp: In member function ‘void SoundCore::pause()’:
SoundCore.cpp:118: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp: In member function ‘void SoundCore::stop()’:
SoundCore.cpp:123: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp: In member function ‘void SoundCore::clearQueue()’:
SoundCore.cpp:128: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp: At global scope:
SoundCore.cpp:131: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.cpp:131: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.cpp: In member function ‘void SoundCore::changeUrlTo(int)’:
SoundCore.cpp:135: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:135: 错误:‘Phonon’未声明
SoundCore.cpp:135: 错误:‘strUrl’在此作用域中尚未声明
SoundCore.cpp:136: 错误:‘emit’在此作用域中尚未声明
SoundCore.cpp:136: 错误:expected `;' before ‘startPlay’
SoundCore.cpp:138: 错误:‘class SoundCore’没有名为‘play’的成员
SoundCore.cpp: At global scope:
SoundCore.cpp:131: 警告:未使用的参数‘QString’
SoundCore.cpp:140: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.cpp:140: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.cpp: In member function ‘void SoundCore::setCurUrl(int)’:
SoundCore.cpp:143: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:143: 错误:‘Phonon’未声明
SoundCore.cpp:143: 错误:‘strUrl’在此作用域中尚未声明
SoundCore.cpp: At global scope:
SoundCore.cpp:140: 警告:未使用的参数‘QString’
SoundCore.cpp:146: 错误:expected ‘,’ or ‘...’ before ‘strUrl’
SoundCore.cpp:146: 错误:ISO C++ 不允许声明无类型的‘QString’
SoundCore.cpp: In member function ‘void SoundCore::pushUrl2Queue(int)’:
SoundCore.cpp:148: 错误:‘class SoundCore’没有名为‘m_pMediaObject’的成员
SoundCore.cpp:148: 错误:‘Phonon’未声明
SoundCore.cpp:148: 错误:‘strUrl’在此作用域中尚未声明
SoundCore.cpp: At global scope:
SoundCore.cpp:146: 警告:未使用的参数‘QString’
SoundCore.cpp:151: 错误:变量或字段‘stateChanged’声明为 void
SoundCore.cpp:151: 错误:‘Phonon’未声明
SoundCore.cpp:151: 错误:‘Phonon’未声明
make: *** [SoundCore.o] 错误 1