Qt-creator使用dll [英] Qt-creator use dll

查看:133
本文介绍了Qt-creator使用dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Qt中访问给定DLL中的函数?

How to access to functions in given DLL in Qt ?

推荐答案

您可以使用Qt类 QLibrary。您可以在 http://doc.trolltech.com/4.7/qlibrary中找到详细的描述和示例。 html

You can use the Qt class "QLibrary". You can find a detailed description and examples at http://doc.trolltech.com/4.7/qlibrary.html

主要思想是,您定义了一个函数指针,并使用QLibrary :: resolve将其分配给dll中的函数,然后您就可以通常将其称为任何函数。

The main idea is, that you define a function pointer, assign it with QLibrary::resolve to the function in the dll, and you can then call it normally as any function.

这篇关于Qt-creator使用dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆