代码之家  ›  专栏  ›  技术社区  ›  M.H.

在Qt Creator的控制台应用程序中调试共享插件

  •  0
  • M.H.  · 技术社区  · 7 年前

    招呼

    我在qt creator的一个会话中有2个项目。一个是控制台应用程序,另一个是共享插件。我正在加载插件,然后调用它的方法。我想输入插件的方法并对其进行调试(如果您在一个解决方案中有项目,则像visual studio一样)。有可能吗?如果是,我该怎么做?

    QPluginLoader * pluginLoader = new QPluginLoader(pluginPath.c_str());
    QObject * plugin = pluginLoader->instance();
    
    if (plugin)
    {
       deviceManager = qobject_cast<DeviceManager *>(plugin);
       return deviceManager->initialize();  //I want to enter this function which is in plugin project
    }
    else
    {
       delete pluginLoader;
       return false;
    }
    

    PS:我正在使用Qt 5.6.2和MinGW 32位。

    提前感谢

    1 回复  |  直到 7 年前
        1
  •  0
  •   M.H.    7 年前

    MinGW不支持此功能。我改用了Microsoft编译器。