Invoking cmake after creating the Q/build directory
cd Q && \
mkdir build && \
cd build && \
cmake -G"CodeBlocks - Unix Makefiles" ../
Finally, I navigated to the Q/example directory and tried to compile the sin_synth.cpp file using g++. But, it gives a compilation error.
$ g++ sin_synth.cpp
/usr/bin/ld: /tmp/ccdapcKc.o: in function `main':
sin_synth.cpp:(.text+0x3a): undefined reference to `cycfi::q::port_audio_stream::start()'
/usr/bin/ld: sin_synth.cpp:(.text+0x55): undefined reference to `cycfi::q::port_audio_stream::stop()'
/usr/bin/ld: /tmp/ccdapcKc.o: in function `sin_synth::sin_synth(cycfi::q::frequency)':
sin_synth.cpp:(.text._ZN9sin_synthC2EN5cycfi1q9frequencyE[_ZN9sin_synthC5EN5cycfi1q9frequencyE]+0x33): undefined reference to `cycfi::q::port_audio_stream::port_audio_stream(unsigned long, unsigned long, int, int)'
/usr/bin/ld: sin_synth.cpp:(.text._ZN9sin_synthC2EN5cycfi1q9frequencyE[_ZN9sin_synthC5EN5cycfi1q9frequencyE]+0x55): undefined reference to `cycfi::q::port_audio_stream::sampling_rate() const'
/usr/bin/ld: sin_synth.cpp:(.text._ZN9sin_synthC2EN5cycfi1q9frequencyE[_ZN9sin_synthC5EN5cycfi1q9frequencyE]+0x7f): undefined reference to `cycfi::q::port_audio_stream::~port_audio_stream()'
/usr/bin/ld: /tmp/ccdapcKc.o: in function `sin_synth::~sin_synth()':
sin_synth.cpp:(.text._ZN9sin_synthD2Ev[_ZN9sin_synthD5Ev]+0x26): undefined reference to `cycfi::q::port_audio_stream::~port_audio_stream()'
/usr/bin/ld: /tmp/ccdapcKc.o:(.data.rel.ro._ZTI9sin_synth[_ZTI9sin_synth]+0x10): undefined reference to `typeinfo for cycfi::q::port_audio_stream'
collect2: error: ld returned 1 exit status
I wonder if I am missing any flags that I need to pass with g++.
I'm using
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
on WSL2 and can't compile the examples in theQ/example
directory.Here's what I did so far.
Q/build
directoryFinally, I navigated to the
Q/example
directory and tried to compile thesin_synth.cpp
file usingg++
. But, it gives a compilation error.I wonder if I am missing any flags that I need to pass with g++.