Librespeaker Compile Error

info about ReSpeaker series products

Moderators:, salmanfarisvp, violet, seth.welday

Post Reply
Posts: 1
Joined: Sun Nov 25, 2018 10:20 am

Librespeaker Compile Error

Post by yklyman » Thu Dec 20, 2018 10:25 pm


I have the 4-mic array pi hat. I am attempting to use the librespeaker library after fully setting up the pi hat. I am able to run the python scripts and communicate with the pi hat but am having trouble compiling the example files for librespeaker.

The command I use is:
g++ -I./ -I./chain_nodes

The response I get is:

/tmp/ccH9URRN.o: In function `main': undefined reference to `respeaker::PulseCollectorNode::Create_48Kto16K(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, bool)' undefined reference to `respeaker::SelectorNode::Create(std::vector<int, std::allocator<int> >, bool)' undefined reference to `respeaker::BaseNode::Uplink(respeaker::BaseNode*)' undefined reference to `respeaker::ReSpeaker::Create(respeaker::LogLevel)' undefined reference to `sf_open' undefined reference to `sf_writef_short' undefined reference to `sf_close'
collect2: error: ld returned 1 exit status

The response seems to indicate it is not linking to the Respeaker class but I have the respeaker.h header file located in the ./ directory and all the header files from chain_nodes loaded there.

I am sure I did not set up the library correctly. Is there a guide to walk me through how to do so? Any help would be appreciated!

Post Reply