Hello there,
I’ve decided to start transitioning to using Cmake as I’ve begun daily driving Linux but I’m quite a beginner at it.
I’ve currently just started trying out compiling the example AudioPlugin in JUCE/examples/CMake, but I’ve had almost no luck with it. I’ve managed to get the build tree up and running, but when I run the actual makefile, it starts for a bit and then crashes. Some snippets of the error message include
juce_audio_formats.cpp:(.text._ZN4juce10FlacReaderC2EPNS_11InputStreamE[_ZN4juce10FlacReaderC5EPNS_11InputStreamE]+0xb0): undefined reference to `FLAC__stream_decoder_new’
and
juce_audio_formats.cpp:(.text._ZN4juce9OggWriterC2EPNS_12OutputStreamEdjjiRKNS_15StringPairArrayE[_ZN4juce9OggWriterC5EPNS_12OutputStreamEdjjiRKNS_15StringPairArrayE]+0xd6): undefined reference to `vorbis_info_init’
I think I’m missing some sort of FLAC and OGG modules. I’ve tried installing FLAC through apt, but the error still remains.
As I said, I’m a beginner with CMake, so this is what I have for my top-level CMakeLists.txt. I’ve tried following the API documentation as closely as possible, but I still feel a little confused by it.
cmake_minimum_required(VERSION 3.22)
project(TestCMake VERSION 1.0.0)
find_package(JUCE CONFIG REQUIRED)
add_subdirectory(AudioPlugin)
It’s quite frustrating having to struggle with the build process, so any help at this point would be great appreciated.
Thanks.