C++学习笔记————Windows下dll动态库编译及调用
一. 编译:
首先,选择Win32项目,设置项目名及地址:
选择DLL,空项目:
编写动态库:
头文件:
#pragma once;
#include<iostream>
#ifdef DLL_IMPLEMENT
#define DLL_API _declspec(dllexport)
#else
#define DLL_API _declspec(dllimport)
#endif
extern "C" DLL_API struct idata* rtu(int d, int e, int f);
extern "C" DLL_API int ssd(struct idata* lgd);
extern "C" DLL_API int add(int a, int b, int c,