const 修饰形参引用时链接失败

    //ControllerConf.h
    class ControllerConf
    {
        int test;
    }

    //Controller.h
    MODULE_EXPORT class Controller
    {
    public:
        Controller();
        ~Controller();
        int Init(void* args); //[1] error
        int Init2(const ControllerConf& config); //[2] error
        //int Init2(ControllerConf& config); //[3] sucessful
    }

    
    // main.cpp
    int main()
    {
        ControllerConf temp;
        auto controller_ = new Controller();
        controller_->Init(nullptr); // sucessful
        controller_->Init2(temp); // error
        return 0 ;
    }

[1]当我写了一个void 作为形参是,链接成功。

[2]当我写了一个const object& 作为形参是,无法解析正确的类型链接时失败,Google查了一圈也没找到原因。

[3]当我写了一个object& 作为形参是,链接成功。

第10行的Controller();改成:

Controller(){};试试看??