C++ QtBitcoinTrader找不到sayText方法
我试图编译C++ QtBitcoinTrader找不到sayText方法,c++,qt,bitcoin,C++,Qt,Bitcoin,我试图编译QT比特币交易员,但由于某种原因,在配置openssl之后,我发现他自己的方法出现了错误 qtBitcoinTrader.cpp void QtBitcoinTrader::sayText(QString text) { Q_UNUSED(text) #ifdef Q_OS_MAC static SpeechChannel voiceChannel; static bool once=true; if(once) { once=f
QT比特币交易员
,但由于某种原因,在配置openssl
之后,我发现他自己的方法出现了错误
qtBitcoinTrader.cpp
void QtBitcoinTrader::sayText(QString text)
{
Q_UNUSED(text)
#ifdef Q_OS_MAC
static SpeechChannel voiceChannel;
static bool once=true;
if(once)
{
once=false;
NewSpeechChannel((VoiceSpec*)NULL, &voiceChannel);
}
CFStringRef talkText=CFStringCreateWithCharacters(0,reinterpret_cast<const UniChar *>(text.unicode()), text.length());
SpeakCFString(voiceChannel, talkText, NULL);
CFRelease(talkText);
#else
#ifdef Q_OS_WIN
#ifdef SAPI_ENABLED
static ISpVoice *pVoice=NULL;
static HRESULT hr=CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if(SUCCEEDED(hr))
{
pVoice->Speak(NULL,SPF_PURGEBEFORESPEAK,0);
pVoice->Speak((LPCWSTR)text.utf16(), SPF_ASYNC, NULL);
}
#endif
#else
startApplication("say",QStringList()<<text);
#endif
#endif
}
是否存在验证我是否错误引用库的方法?您尚未将
应用程序服务和CoreFoundation
框架添加到您的构建中,并且您也缺少系统libz。将以下内容添加到.pro
文件中,然后重新运行qmake并重新生成:
LIBS += -framework ApplicationServices -framework CoreFoundation -lz
您没有将应用程序服务
和CoreFoundation
框架添加到构建中,并且您也缺少系统libz。将以下内容添加到.pro
文件中,然后重新运行qmake并重新生成:
LIBS += -framework ApplicationServices -framework CoreFoundation -lz