Problem with adding DSP module

Hi everyone,

does anyone know if it is normal to get a build error after including dsp module?

For example, if I take a tutorial project “Build a white noise generator” and open it in Xcode 12.4 it builds and runs normally but if I include a dsp module it gives me two build errors:

*No member named 'getInputBlock' in 'juce::dsp::ProcessContextReplacing<double>'*

*No member named 'getInputBlock' in 'juce::dsp::ProcessContextReplacing<float>'*

On the other hand, if I take a tutorial project “Introduction to DSP” with included dsp module, it builds and runs normally.
I am working with JUCE 6.1.2.

In other words, do I need to do something special after including dsp module?

Thanks!

How are you adding the module? Normally just adding the module to your project should not produce any build errors. Are you also modifying the project code after including the module?

To help us track down the issue, it would be helpful if you could provide an ordered list of the steps you took (e.g. “downloaded project x on windows/macos/linux, opened it in the Projucer, added the new module, saved the project, then tried to buld it”). This will allow other people to better understand the issue, so they’ll be able to give you better advice.

Hi reuk!

Thanks for your feedback! So, I am adding the module via Projucer and then I save the changes, reload the Xcode (I don’t modify any code) and the build error is there.

Steps:

  1. Download „Build a white noise generator“ project from here.

  2. Open Projucer project, select Xcode as Exporter and open the project in Xcode

  3. Build and run the project → everything is fine

  4. In Projucer window I add dsp module to the project and save the project

  5. Xcode reloads

  6. Build → gives error

I am working on macOS Catalina v.10.15.7.

The DSP module requires at least the C++14 standard, is that set in the Projucer project?

Yes, C++14 standard is selected.

I just tried running those same steps, but Xcode was able to build the project successfully after adding the juce_dsp module.

Perhaps there is a problem with the way in which you are adding the juce_dsp module. Are you definitely using the same versions of all modules? For example, maybe you have several copies of JUCE at different versions on your system, and are accidentally adding juce_dsp from the wrong JUCE directory. After adding juce_dsp, check that the Path for "Xcode (macOS)" field has the same value for all modules, and that the Use global path option is in a consistent state for all modules.

Hi reuk.

After you said that on your computer you don’t have that problem, I downloaded again the same JUCE version and the problem was gone. After that I compared dsp modules and noticed that there is a difference in juce_ProcessContex.h file.
So it looks like I accidently deleted end of the block comment and saved the changes.

Thanks again for your help!

Great, glad you got it working!