4

QT5.12.12下CTK框架无法使用(程序崩溃)

 2 years ago
source link: https://www.oschina.net/question/5722062_2325586
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

QT5.12.12下CTK框架无法使用(程序崩溃)

osc_42723635 发布于 04/12 10:43
阅读 278

我在win10、QT5.12.12mingw下使用CTK框架进行插件开发。

参考帖子完成了CTK的编译安装。https://www.ebaina.com/articles/140000004276

但使用程序加载ctkPluginFramework时程序总是崩溃,用try catch捕捉不到异常。用ctkPluginFrameworkLauncher::addSearchPath 或 ctkPluginFrameworkFactory factory 都一样,执行到这一句都crash,有哪位高手知道是什么原因吗?

进行debug,发现ctkApplicationHandle.cpp中出了问题

up-e7c5c921505b5ac3bdb38152f29bdfb4688.png

而对应的两行代码,如下:

26  const QString ctkApplicationHandle::APPLICATION_PID = ctkPluginConstants::SERVICE_PID;

32  const QString ctkApplicationHandle::STOPPING = "STOPPING";

这个cpp里没有类的实现,只有6个const QString的定义。这种写法没问题。我做了一个同样写法的例子,运行没有任何问题,不知为什么这里会导致段错误?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK