开发环境就是QT5.8+MinGW 32bit .
.h代码
#ifndef DLL_TEST_H#define DLL_TEST_H#define DLL_CAL_BACK _stdcall#include <QtCore/qglobal.h>#if defined(DLL_TEST_LIBRARY)# define DLL_TESTSHARED_EXPORT Q_DECL_EXPORT#else# define DLL_TESTSHARED_EXPORT Q_DECL_IMPORT#endifclass DLL_TESTSHARED_EXPORT Dll_test{public: Dll_test(); int add(int a,int b);};#endif // DLL_TEST_H
.cpp代码
#include "dll_test.h"
Dll_test::Dll_test(){}
Dll_test::add(int a, int b){ return a+b;}函数名称是add,调用DLL时函数名称变成_ZN8Dll_test3addEii,怎么让函数名称不改变?哪位有经验人士指点下?谢谢!