Librespeaker Compile Error

info about ReSpeaker series products

Moderators: lily.li, violet, seth.welday

Post Reply
yklyman
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Sun Nov 25, 2018 10:20 am

Librespeaker Compile Error

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

Hello,

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 pulse_base_test_8.cc

The response I get is:

/tmp/ccH9URRN.o: In function `main':
pulse_base_test_8.cc:(.text+0x5f4): undefined reference to `respeaker::PulseCollectorNode::Create_48Kto16K(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, bool)'
pulse_base_test_8.cc:(.text+0x674): undefined reference to `respeaker::SelectorNode::Create(std::vector<int, std::allocator<int> >, bool)'
pulse_base_test_8.cc:(.text+0x6c4): undefined reference to `respeaker::BaseNode::Uplink(respeaker::BaseNode*)'
pulse_base_test_8.cc:(.text+0x6cc): undefined reference to `respeaker::ReSpeaker::Create(respeaker::LogLevel)'
pulse_base_test_8.cc:(.text+0x8a0): undefined reference to `sf_open'
pulse_base_test_8.cc:(.text+0x990): undefined reference to `sf_writef_short'
pulse_base_test_8.cc:(.text+0xa14): 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