# Call to deleted constructor of 'WavetablePlugInAudioProcessor'

**URL:** <https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717>\
**Category:** Audio Plugins\
**Created:** [January 26, 2023, 3:38pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717 "2023-01-26T15:38:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 26, 2023, 3:38pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/1 "2023-01-26T15:38:14Z")

</div>

Hi, i am working on a Wavetable Synthesizer, only worked in a sub class, but im getting the compile error “Call to deleted constructor of ‘WavetablePlugInAudioProcessor’” and “Unknown type name ‘WavetablePlugInAudioProcessorEditor’; did you mean ‘WavetablePlugInAudioProcessor’?” in the processor line:

````
```juce::AudioProcessorEditor* WavetablePlugInAudioProcessor::createEditor(){
return new WavetablePlugInAudioProcessorEditor (*this);
} ```

````

That confuses me, i didn’t changed anything of this function. What is to do to fix this?

Thanks

---

<div class="post-metadata">

**Author:** ![BitRate27](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@BitRate27](https://forum.juce.com/u/BitRate27)\
**Post date:** [January 26, 2023, 6:59pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/2 "2023-01-26T18:59:21Z")

</div>

The deleted constructor error is usually associated with the smart pointers. Are you moving your Editor so it is not a sub class of the Processor?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [January 26, 2023, 7:07pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/3 "2023-01-26T19:07:19Z")

</div>

It would be good to see the exact error message, including where the error occurred.  
While it is a common mistake to accidently copy things that have the copy constructor intentionally deleted, there are other mistakes that show similar errors.

---

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 27, 2023, 12:18pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/4 "2023-01-27T12:18:10Z")

</div>

thanks for your reply.  
like so?

 ![first](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/4/440cbcbf3e3db6983303a0f8ad55e8abf0f71847.jpeg)  
 ![second](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/c/cecd74b8f2922ab1b7b012e255854b5efc644bed.jpeg)  
 ![thirdPic](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/5/5ed155dc3fbbf2472cc850b1806127d9ee4d5f3d.jpeg)

What does it mean to ‘copy things that have the copy constructor intentionally deleted’? Sorry i’m quite new to Juce and C++ and learn both simultaneously.

---

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 27, 2023, 12:19pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/5 "2023-01-27T12:19:32Z")

</div>

thanks for the reply.  
I dont think so, but i dont really know, how would i move the Editor?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [January 27, 2023, 12:31pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/6 "2023-01-27T12:31:19Z")

</div>

The copy constructor is a red herring. It doesn’t know your Editor by the type of `WavetablePlugInAudioProcessorEditor`. It seems you simply forgot/removed the include to the class declaration, usually called like this in the PluginProcessor.cpp:

```auto
#include "PluginEditor.h"

```

or similar, check the actual name in your project.

---

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 27, 2023, 12:54pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/7 "2023-01-27T12:54:11Z")

</div>

Yes thanks, i dont have a clue how i deleted that accidentally^^

Now i am getting:

“No matching constructor for initialization of ‘WavetablePlugInAudioProcessorEditor’”

in the same line,

“1. Candidate constructor not viable: no known conversion from ‘WavetablePlugInAudioProcessor’ to ‘const WavetablePlugInAudioProcessorEditor’ for 1st argument”

in the last line of the editor (JUCE\_DECLARE\_NON\_COPYABLE…) and

“2. Candidate constructor not viable: requires 2 arguments, but 1 was provided”

in the constructor line of the editor.h file, wich is:  
` WavetablePlugInAudioProcessorEditor (WavetablePlugInAudioProcessor&, WavetableSound&);`

---

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 27, 2023, 2:00pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/8 "2023-01-27T14:00:39Z")

</div>

> [@RotznPlotz](#):
>
> Candidate constructor not viable: requires 2 arguments, but 1 was provided

It seems to me that i have to declare a pointer to my subclass WavetableSound in

```auto
juce::AudioProcessorEditor* WavetablePlugInAudioProcessor::createEditor()
{
    return new WavetablePlugInAudioProcessorEditor (*this);
}

```

because the editor changes variables in the subclass. Am i right and if so how do i do that?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [January 27, 2023, 4:00pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/9 "2023-01-27T16:00:59Z")

</div>

Yes, you added a second parameter (argument) to your constructor, that you have to supply.  
Assuming you have a member in your processor you have to supply it to the constructor:

```auto
// member:
WavetableSound sound;

juce::AudioProcessorEditor* WavetablePlugInAudioProcessor::createEditor()
{
    return new WavetablePlugInAudioProcessorEditor (*this, sound);
}

```

---

<div class="post-metadata">

**Author:** ![RotznPlotz](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@RotznPlotz](https://forum.juce.com/u/RotznPlotz)\
**Post date:** [January 28, 2023, 3:55pm UTC](https://forum.juce.com/t/call-to-deleted-constructor-of-wavetablepluginaudioprocessor/54717/10 "2023-01-28T15:55:17Z")

</div>

Ah thanks, works now:)
