#ifndef UNTITLED1_H
#define UNTITLED1_H
#include "untitled1_global.h"
class UNTITLED1_EXPORT Untitled1
{
public:
Untitled1();
int add(int a,int b);
};
#endif // UNTITLED1_H
这种在类内的add函数不能使用QLibrary resolve解析,可以使用静态库lib加头文件的方法调用
#ifndef UNTITLED1_H
#define UNTITLED1_H
#include "untitled1_global.h"
class UNTITLED1_EXPORT Untitled1
{
public:
Untitled1();
int add(int a,int b);
};
extern "C"
{
UNTITLED1_EXPORT int add(int a,int b);
}
#endif // UNTITLED1_H
这种UNTITLED1_EXPORT声明的可以使用QLibrary resolve解析