videolabs / libspatialaudio

Ambisonic encoding / decoding and binauralization library in C++
Other
198 stars 37 forks source link

Cannot compile simple code #36

Open mramalingam2203 opened 2 years ago

mramalingam2203 commented 2 years ago

I installed the library via ubuntu packages and it seems the header files need to be included in the compilation: g++ code.cpp -I/home/muthu/Documents/work/kickback/libspatialaudio/include -I/home/muthu/Documents/work/kickback/libspatialaudio/include/hrtf -I/home/muthu/Documents/work/kickback/libspatialaudio/source/kiss_fft -lspatialaudio

While some of the functions of the object could be linked some could not be. The error is like this: /usr/bin/ld: /tmp/ccQTjiik.o: in function main': code.cpp:(.text+0x115): undefined reference toCAmbisonicEncoder::SetPosition(PolarPoint, float)' /usr/bin/ld: code.cpp:(.text+0x182): undefined reference to `CAmbisonicDecoder::Configure(unsigned int, bool, unsigned int, int, unsigned int)'

May I know how it can be resolved?

collect2: error: ld returned 1 exit status