Hi,
pretty new to JUCE. Followed this tutorial to setup the env. It compile and run well.
Now, I’m trying to introduce an LFO using LookupTable on my Audio Plugin.
So I’ve add this on PluginProcessor.h:
#include <juce_dsp/juce_dsp.h>
...
class AudioPluginAudioProcessor : public juce::AudioProcessor
{
public:
static constexpr size_t lfoUpdateRate = 100;
size_t lfoUpdateCounter = lfoUpdateRate;
juce::dsp::Oscillator<float> lfo;
...
};
and this on PluginProcessor.cpp:
AudioPluginAudioProcessor::AudioPluginAudioProcessor()
: AudioProcessor(BusesProperties()
#if !JucePlugin_IsMidiEffect
#if !JucePlugin_IsSynth
.withInput("Input", juce::AudioChannelSet::stereo(), true)
#endif
.withOutput("Output", juce::AudioChannelSet::stereo(), true)
#endif
)
{
addParameter(gain = new juce::AudioParameterFloat("gain", // parameterID
"Gain", // parameter name
0.0f, // minimum value
1.0f, // maximum value
0.5f)); // default value
lfo.initialise ([] (float x) { return std::sin(x); }, 128);
lfo.setFrequency (3.0f);
}
but when I do:
cmake -B cmake-build
cmake --build cmake-build
it says this:
error LNK2019: unresolved external symbol “public: void __cdecl juce::dsp::LookupTableTransform::ini
tialise(class std::function<float __cdecl(float)> const &,float,float,unsigned __int64)” (?initialise@?$LookupTableTransform@M@dsp@juce@@QEAAXAEBV?$funct
ion@$$A6AMM@Z@std@@MM_K@Z) referenced in function “public: __cdecl juce::dsp::LookupTableTransform::LookupTableTransform(class std::functio
n<float __cdecl(float)> const &,float,float,unsigned __int64)” (??0?$LookupTableTransform@M@dsp@juce@@QEAA@AEBV?$function@$$A6AMM@Z@std@@MM_K@Z) [C:\repo
s\JUCE\MyNewPlugin\cmake-build\AudioPluginExample_VST3.vcxproj]
MyNewPlugin_SharedCode.lib(PluginProcessor.obj) : error LNK2019: unresolved external symbol "public: __cdecl juce::dsp::LookupTable::LookupTable<float(void)" (??0?$LookupTable@M@dsp@juce@@QEAA@XZ) referenced in function “public: __cdecl juce::dsp::LookupTableTransform::LookupTableTransform(class std::function<float __cdecl(float)> const &,float,float,unsigned __int64)” (??0?$LookupTableTransform@M@dsp@juce@@QEAA@AEBV?$function@$$A6AMM@Z@
std@@MM_K@Z) [C:\repos\JUCE\MyNewPlugin\cmake-build\AudioPluginExample_VST3.vcxproj]
C:\repos\JUCE\MyNewPlugin\cmake-build\AudioPluginExample_artefacts\Debug\VST3\MyNewPlugin.vst3\Contents\x86_64-win\MyNewPlugin.vst3 : fatal error LNK1120: 2 unresolv
ed externals [C:\repos\JUCE\MyNewPlugin\cmake-build\AudioPluginExample_VST3.vcxproj]
Am I missing some .h? Or what’s going bad?
Thanks for any helps