//头文件:
//#pragma once
#ifdef sayhello_EXPORTS
#define sayhello_API __declspec(dllexport)
#else
#define sayhello_API __declspec(dllimport)
#endif
namespace say
{
// This class is exported from the MathFuncsDll.dll
class Myhello
{
public:
// Returns a + b
static sayhello_API int sayhello();
};
}
//cpp文件:
#include "stdafx.h"
#include "sayhello.h"
#include <stdexcept>
using namespace std;
namespace say
{
int Myhello::sayhello()
{
return 1;
}
}
//def文件:
LIBRARY
EXPORTS
sayhello