2016-06-18 1 views
1

QT Bitcoin Trader을 컴파일하려고하는데 어떤 이유로 구성한 후에 openssl 자신의 메서드로 오류가 발생합니다.QtBitcoinTrader가 sayText 메서드를 찾을 수 없습니다

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 
} 

오류 로그

Undefined symbols for architecture x86_64: 
    "_CFRelease", referenced from: 
     QtBitcoinTrader::sayText(QString) in qtbitcointrader.o 
    "_CFStringCreateWithCharacters", referenced from: 
     QtBitcoinTrader::sayText(QString) in qtbitcointrader.o 
    "_NewSpeechChannel", referenced from: 
     QtBitcoinTrader::sayText(QString) in qtbitcointrader.o 
    "_SpeakCFString", referenced from: 
     QtBitcoinTrader::sayText(QString) in qtbitcointrader.o 
    "_inflate", referenced from: 
     JulyHttp::uncompress(QByteArray*) in julyhttp.o 
    "_inflateEnd", referenced from: 
     JulyHttp::uncompress(QByteArray*) in julyhttp.o 
    "_inflateInit2_", referenced from: 
     JulyHttp::uncompress(QByteArray*) in julyhttp.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [DemoProject.app/Contents/MacOS/DemoProject] Error 1 
03:03:20: The process "/usr/bin/make" exited with code 2. 
Error while building/deploying project DemoProject (kit: Desktop Qt 5.6.0 clang 64bit) 
When executing step "Make" 

내가 잘못 라이브러리를 참조하는 경우 확인하는 방법을 존재?

답변

0

빌드에 ApplicationServicesCoreFoundation 프레임 워크를 추가하지 않았으며 시스템 libz도 누락되었습니다. .pro 파일에 다음을 추가하고 qmake를 다시 실행하여 다시 빌드하십시오.

LIBS += -framework ApplicationServices -framework CoreFoundation -lz 
관련 문제