Qt学习之路(60): 创建shared library
来源:互联网 发布:淘宝情趣内衣模特 编辑:程序博客网 时间:2024/04/29 00:07
http://devbean.blog.51cto.com/448512/319479
- #ifndef LIB_GLOBAL_H
- #define LIB_GLOBAL_H
- #include <QtCore/qglobal.h>
- #if defined(LIB_LIBRARY)
- # define LIBSHARED_EXPORT Q_DECL_EXPORT
- #else
- # define LIBSHARED_EXPORT Q_DECL_IMPORT
- #endif
- #endif // LIB_GLOBAL_H
- #ifndef LIB_H
- #define LIB_H
- #include <QMainWindow>
- #include "lib_global.h"
- class LIBSHARED_EXPORT MainWindow : public QMainWindow {
- public:
- MainWindow(QWidget *parent = 0);
- };
- #endif // LIB_H
- #include "lib.h"
- MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
- {
- }
- TARGET = test
- TEMPLATE = app
- SOURCES += main.cpp
- INCLUDEPATH += ../
- LIBS += ../debug/lib.dll
- #include <QtGui/QApplication>
- #include "lib.h"
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- MainWindow w;
- w.show();
- return a.exec();
- }
阅读全文
0 0
- Qt学习之路(60): 创建shared library
- Qt学习之路(60): 创建shared library
- Qt学习之路(60): 创建shared library
- Qt学习之路(60): 创建shared library
- Qt学习之路(60): 创建shared library
- Qt学习之路(60): 创建shared library
- Qt创建shared library
- Qt 创建shared library,调用shared library
- 创建shared library
- Qt学习之路(60): 创建dll
- QT关于共享库 shared library。
- Qt学习之路(4)创建对话框
- Qt学习之路(7): 创建一个对话框(上)
- Qt学习之路(8): 创建一个对话框(下)
- Qt学习之路(7): 创建一个对话框(上)
- Qt学习之路(8): 创建一个对话框(下)
- Qt学习之路(7): 创建一个对话框(上)
- Qt学习之路(8): 创建一个对话框(下)
- tty驱动程序架构
- 串口驱动分析-初始化
- 串口驱动分析-打开设备
- 串口驱动分析-发送
- 串口驱动分析-接收
- Qt学习之路(60): 创建shared library
- getWriter() has already been called for this response 的解决办法
- 怎么安装wheel
- 网卡驱动架构分析
- linux shell 数组建立及使用技巧
- 回环网卡驱动设计
- Fragment加载替换add,show,hide,replace方法
- NDK开发 从入门到放弃(七:Android Studio 2.2 CMAKE 高效NDK开发)
- 网络子系统深度分析