C++14 Undefined Reference to Operator Delete
<p>I'm getting <code>undefined reference to 'operator delete(void*, unsigned int)'</code> in my virtual destructors.</p>

<pre><code>26:        virtual ~ADC() = default;
21:        virtual ~FPGA() = default;
25:        virtual ~Emitter() = default;
40:        virtual ~Object() = default;
</code></pre>

<p>ADC, FPGA, Emitter and inherit from DMA::Object. DMA is a namespace.</p>

<p>This code compiled with GCC 4.9 but began failing when I switched tools to GCC 5.4.1.</p>

<p>This is an embedded system and I'm not using dynamic memory allocation though I do use placement new for a root container object.</p>

<p>It occurred to me that <code>#include &lt;new&gt;</code> might help as cppreference <a href="http://en.cppreference.com/w/cpp/memory/new/operator_delete" rel="nofollow">suggests that it is defined here</a> but that did not work.</p>

<p>It's not necessary that these be virtual but I'd like to understand why delete is called when I'm not using new directly on these classes. Furthermore it suggests that delete is missing from the actual destructor itself which wouldn't know how it was allocated.</p>

<p>I'd also appreciate it if someone can shed some light on these sized delete operators.</p>

<p>Here's a minimal example compiled with <code>std=c++14</code>:</p>

<pre><code>class A
{
    public:

        A() = default;

        virtual ~A() = default;
};

class B : public A
{
    public: 

        B() = default;

        virtual ~B() = default;
};

int main(void)
{
    static B b;
}

&gt; Building ‘Verify’ from solution ‘Louise’ in configuration ‘Debug’ 1&gt;
&gt; Compiling ‘Verify.cpp’ 1&gt; Linking Verify.elf 1&gt; Output/Verify
&gt; Debug/Obj/Verify.o: In function `A::~A()': 1&gt;
&gt; /Volumes/Development/louise/Verify.cpp:7: undefined reference to
&gt; `operator delete(void*, unsigned int)' 1&gt; Output/Verify
&gt; Debug/Obj/Verify.o: In function `A::~A()': 1&gt;
&gt; /Volumes/Development/louise/Verify.cpp:7: undefined reference to
&gt; `operator delete(void*, unsigned int)' 1&gt; Output/Verify
&gt; Debug/Obj/Verify.o: In function `B::~B()': 1&gt;
&gt; /Volumes/Development/louise/Verify.cpp:16: undefined reference to
&gt; `operator delete(void*, unsigned int)' 1&gt; Output/Verify
&gt; Debug/Obj/Verify.o: In function `B::~B()': 1&gt;
&gt; /Volumes/Development/louise/Verify.cpp:16: undefined reference to
&gt; `operator delete(void*, unsigned int)' Build failed
</code></pre>