c++报错undefined reference to "析构函数",引号里的析构函数是基类的析构函数,声明为了纯虚函数?

这是c++ primer plus第六版中的程序清单14.10,P560页。
一模一样,就是这样报错,也没办法继续写下去了。
自学的,没办法了,不知道找谁问,贼难受!!!

//类声明
#ifndef WORKER_H_
#define WORKER_H_

#include <string>

using std::string;

class Worker{
    private:
        string fullname;
        long id;

    protected:
        virtual void Data() const;
        virtual void Get();

    public:
        Worker() : fullname("no one"), id(0L) {}
        Worker(const string & s, long n) : fullname(s), id(n) {}

        virtual ~Worker() = 0;
        virtual void Set() = 0;
        virtual void Show() const = 0;
};

class Waiter : virtual public Worker
{
    private:
        int panache;

    protected:
        virtual void Data() const;
        virtual void Get();

    public:
        Waiter() : Worker(), panache(0) {}
        Waiter(const string & s, long n, int p = 0) : Worker(s, n), panache(p) {}
        Waiter(const Worker & wk, int p = 0) : Worker(wk), panache(p) {}

        void Set();
        void Show() const;
};

#endif
//实现文件
#include <iostream>
#include "worker.h"

using namespace std;

//Worker 方法
void Worker::Data() const
{
    cout << "名字:" << fullname << endl;
    cout << "工号:" << id << endl;
}

void Worker::Get()
{
    getline(cin,fullname);
    cout << "请输入工号:";
    cin >> id;
    while (cin.get() != '\n')   continue;
}




//Waiter 方法
void Waiter::Data() const
{
    cout << "等级:" << panache << endl;
}

void Waiter::Get()
{
    cout << "请输入等级:";
    cin >> panache;
    while (cin.get() != '\n')   continue;
}

void Waiter::Set()
{
    cout << "请输入服务员的姓名:" << endl;
    Worker::Get();
    Get();
}

void Waiter::Show() const
{
    Worker::Data();
    Data();
}

纯虚析构函数在c++中是合法的,但是在使用的时候有一个额外的限制:必须为纯虚析构函数提供一个函数体。你的实现文件并没有给worker类的纯虚函数定义函数体,因此会有报错

https://blog.csdn.net/xihuanzhi1854/article/details/81635753

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^