Undefined Symbol Error on build

Hi I am trying to build a small project but getting the following error below:
Xcode: 11.0
Osx 10.14.6
Just wondering if anyone has come across it before, tks.

Undefined symbols for architecture x86_64:
“juce::dsp::LookupTable::LookupTable()”, referenced from:
juce::dsp::LookupTableTransform::LookupTableTransform(std::__1::function<float (float)> const&, float, float, unsigned long) in libBasicSynth.a(PluginProcessor.o)
“juce::dsp::LookupTableTransform::initialise(std::__1::function<float (float)> const&, float, float, unsigned long)”, referenced from:
juce::dsp::LookupTableTransform::LookupTableTransform(std::__1::function<float (float)> const&, float, float, unsigned long) in libBasicSynth.a(PluginProcessor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is the DSP module in the included modules in projucer?

It’s not included in projects by default

Ye its there.

I had something like this a while ago and it turned out to be a simple mistake in my c++. I think it’s usually something to do with static class variables/methods, make sure they are initialized/declared properly. May not be the problem in your case but worth checking.

I have narrowed it down to this line here:

juce::dsp::Oscillator< float > osc { ( float x) { return std::sin (x); }};

which is strange because under that this following line has no issues:

juce::dsp::Gain< float > gain;

Also that line I copied from another project and that other project has no issues.

That looks ok. I’m not at my computer, but maybe try giving it the optional second parameter (the lookupTableNumPoints one) just to see if that changes the error?

Also I’d check if changing the (outer) curly braces to parentheses would fix the error - maybe there’s a type conversion issue that is throwing it off, and allowing type narrowing (which curly braces does not) would allow it to resolve that.

Hey no problem. I actually started this project again, it wasnt so big. Same code and no error so I must have done something wrong when adding the juce_dsp module the first time. Thanks for your help.