21.4 windows_21_Library_use_DLL 动态库补充4
2016-06-10 09:55
393 查看
windows_21_Library_use_DLL 动态库补充4
[/code]
来自为知笔记(Wiz)
#include <iostream>
using namespace std;
//第2.1.1步 导入 lib
#pragma comment(lib,"../debug/windows_21_Library_DLL_test.lib")
//第2.1.2步 定义函数原型
int Dll_Add( int nAdd1, int nAdd2 );
extern "C"/*如果不加这个会出错*/ int Dll_Sub( int nSub1, int nSub2 );
//DEF导出定义函数原型
int Dll_Mul( int nMul1, int nMul2 );
int main( )
{
//第2.1.3步 使用函数
int nAdd = Dll_Add( 100, 100 );
int nSub = Dll_Sub( 100, 100 );
int nMul = Dll_Mul( 100, 100 );
cout << nAdd << endl << nSub << endl << nMul << endl;
}
[/code]
来自为知笔记(Wiz)
相关文章推荐
- Android学习中出现的错误以及解决
- ffmpeg学习(3)—— ffmpeg,ffplay,ffprobe
- ubuntu查看系统资源占用(内存,cpu和进程)
- JS中一些常用函数学习总结
- Font Awesome 字体支持 ie
- 执行器实现返回多个任务并处理第一个结果
- Android中Button,EditText获取焦点后点击事件的触发
- 将输入流读取成String后返回
- java基础之网络编程
- Android中Serializable和Parcelable接口用法
- Pixel Shuffle [Poj 2789,CERC 2005/SWERC 2005,LA 3510]
- 哈夫曼树
- 21.3 windows_21_Library_DLL_test&&CPP&&DEF 动态库补充3
- 21.2 windows_21_Library_Class_DLL_USE 动态库补充2
- Java界面开发——登录并对用户身份进行验证
- linux 快速删除大量/大文件
- 解决Android学习之ScollView嵌套ListView和GridView问题
- Same Tree
- Authentication
- Crossin先生的微信打飞机游戏(4)