Librespeaker Compile Error


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':<br/> undefined reference to respeaker::PulseCollectorNode::Create_48Kto16K(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool)’ undefined reference to respeaker::SelectorNode::Create(std::vector<int, std::allocator<int> >, bool)'<br/> undefined reference to respeaker::BaseNode::Uplink(respeaker::BaseNode*)’ undefined reference to respeaker::ReSpeaker::Create(respeaker::LogLevel)'<br/> undefined reference to sf_open’ undefined reference to sf_writef_short'<br/> 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!