Can not find sayText method in QtBitcoinTrader

0 votes

I'm trying to compile the QT Bitcoin Trader using the following code:

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
}

When I compile the code, I get the following error:

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"

How to solve this error?

Aug 30, 2018 in Blockchain by digger
• 27,620 points
28 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You've not added the ApplicationServices and CoreFoundation frameworks to your build, and you're missing the system libz too. Add the following to the .pro file, then re-run qmake and build again:

LIBS += -framework ApplicationServices -framework CoreFoundation -lz

This should solve your error

answered Aug 30, 2018 by slayer
• 29,040 points

Related Questions In Blockchain

0 votes
1 answer

Can not make a peer in Hyperledger Fabric

You have not installed jdk on your system. ...READ MORE

answered Nov 22, 2018 in Blockchain by Omkar
• 65,850 points
26 views
0 votes
1 answer

Private ethereum network can not find geth.ipc

If you have initialized the genesis block ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 65,850 points
90 views
0 votes
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
43 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
64 views
0 votes
1 answer
0 votes
1 answer

why are permissions not stored in blockchain?

When a channel is created, the configurations ...READ MORE

answered Jul 10, 2018 in Blockchain by slayer
• 29,040 points
13 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.