Problem linking in Linux

Hello, I’m new to Juce and I’m trying to make an audio plugin using a static library for performing CQT (
However, I’m having trouble linking the library. (pics at the end.)
I found two threads about similar problems:
forum.juce [dot] com/t/problems-linking-static-library/27910
forum.juce [dot] com/t/makefile-linking-problem/18889/3
However my interface is different from the one shown in the first thread (Linux vs. OsX, see pic) and recompiling the library didn’t work.
As far as I could find ( this could be a problem in linking order… Am I doing something wrong?
P.S. The linking works fine if I only instantiate the CQParameters object. Problems arise with the ConstantQ and CQInverse.

P.P.S. As a new user I can only upload one picture. I’ll paste the linking error and my code…

Linking error:

Linking juceCQTshifter - Standalone Plugin
build/juceCQTshifter.a(PluginProcessor_a059e380.o): In function JuceCqtshifterAudioProcessor::JuceCqtshifterAudioProcessor()': /home/lifeinlowkey/Scrivania/Programmi/JUCE_Projects/juceCQTshifter/Builds/LinuxMakefile/../../Source/PluginProcessor.cpp:14: undefined reference toConstantQ::ConstantQ(CQParameters)’
/home/lifeinlowkey/Scrivania/Programmi/JUCE_Projects/juceCQTshifter/Builds/LinuxMakefile/…/…/Source/PluginProcessor.cpp:14: undefined reference to CQInverse::CQInverse(CQParameters)' /home/lifeinlowkey/Scrivania/Programmi/JUCE_Projects/juceCQTshifter/Builds/LinuxMakefile/../../Source/PluginProcessor.cpp:14: undefined reference toConstantQ::~ConstantQ()’
build/juceCQTshifter.a(PluginProcessor_a059e380.o): In function JuceCqtshifterAudioProcessor::~JuceCqtshifterAudioProcessor()': /home/lifeinlowkey/Scrivania/Programmi/JUCE_Projects/juceCQTshifter/Builds/LinuxMakefile/../../Source/PluginProcessor.cpp:20: undefined reference toCQInverse::~CQInverse()’
/home/lifeinlowkey/Scrivania/Programmi/JUCE_Projects/juceCQTshifter/Builds/LinuxMakefile/…/…/Source/PluginProcessor.cpp:20: undefined reference to `ConstantQ::~ConstantQ()’
collect2: error: ld returned 1 exit status
Makefile:110: recipe for target ‘build/juceCQTshifter’ failed
make: *** [build/juceCQTshifter] Error 1

My code (few lines added to the template):

#include “…/ConstantQlib/cq/ConstantQ.h”
#include “…/ConstantQlib/cq/CQBase.h”
#include “…/ConstantQlib/cq/CQInverse.h”
#include “…/ConstantQlib/cq/CQKernel.h”
#include “…/ConstantQlib/cq/CQParameters.h”
#include “…/ConstantQlib/src/Pitch.h”

class JuceCqtshifterAudioProcessor : public AudioProcessor

CQParameters params = CQParameters(0,0,0,0);
ConstantQ cq = ConstantQ(params);
CQInverse cqi = CQInverse(params);

Linking setings:


Your screenshot shows the Live Build Settings, not the settings of the Linux Makefile exporter.

1 Like

I see, thank you… I found the right page now.