#ifndef T14LIBRARY_H
#define T14LIBRARY_H
#include "t14library_global.h"
class T14LIBRARYSHARED_EXPORT T14Library
{
public:
T14Library();
void Encrypt();
};
#endif // T14LIBRARY_H
#include "t14library.h"
#include <QDebug>
T14Library::T14Library()
{
}
void T14Library::Encrypt()
{
qDebug() << "Encrypt";;
}
SOURCES += \
main.cpp
# 如果QT mingw版本,使用动态库方式和linux没区别(-L, -l)
# 如果QT VS版本。。。使用动态库方式和windows没区别
# 如果QT mingw版本,要调用VS写的动态库,使用一个工具,生成libXXXXX.a文件
LIBS += -LD:\QT\QT0718\build-T14Library-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug -lT14Library
#include <QCoreApplication>
#include "../T14Library/t14library.h"
int main(int argc, char* argv[])
{
QCoreApplication app(argc, argv);
T14Library d;
d.Encrypt();
app.exec();
}