ggerganov / ggwave

Tiny data-over-sound library
https://youtu.be/Zcgf77T71QM
MIT License
1.9k stars 141 forks source link

Can't build ggwave with clang++ #117

Open wooram-yang opened 1 week ago

wooram-yang commented 1 week ago

I want to use this library as a static library. So, I tried to build ggwave.cpp with clang++. But, There was an error like below. how can I deal with this?

$ clang++ -std=c++11 ggwave.cpp -o ggwave.o

ld: Undefined symbols:
  Resampler::reset(), referenced from:
      GGWave::encode(std::__1::function<void (void const*, unsigned int)> const&) in ggwave-ab4ff4.o
      GGWave::decode(std::__1::function<unsigned int (void*, unsigned int)> const&) in ggwave-ab4ff4.o
  Resampler::resample(float, int, float const*, float*), referenced from:
      GGWave::encodeSize_samples() const in ggwave-ab4ff4.o
      GGWave::encode(std::__1::function<void (void const*, unsigned int)> const&) in ggwave-ab4ff4.o
      GGWave::decode(std::__1::function<unsigned int (void*, unsigned int)> const&) in ggwave-ab4ff4.o
      GGWave::decode(std::__1::function<unsigned int (void*, unsigned int)> const&) in ggwave-ab4ff4.o
  Resampler::Resampler(), referenced from:
      GGWave::Impl::Impl() in ggwave-ab4ff4.o
  _main, referenced from:
      <initial-undefines>
clang: error: linker command failed with exit code 1 (use -v to see invocation)