Window DLL and LIB export

1.  lib export way

   

    有三种导出方法,如下:

 

/IMPLIB 选项重写 LINK 在生成包含导出的程序时所创建的导入库的默认名称。               默认名称由主输出文件的基名称和扩展名 .lib 组成。  如果指定了下列一项或多项内容,则程序包含导出: 

  • 源代码中的 __declspec(dllexport) 关键字                               

  • .def 文件中的 EXPORTS 语句                               

  • LINK 命令中的 /EXPORT 规范

2. dllexport export way

_declspec( dllexport ) void fun1( ... )
{
 ......
}
_declspec( dllexport ) void fun2(  )
{
 ......
}

3. .def export way

    project GLRender will export GLRender.lib, and generate GLRender.dll

    3.1  project property

    by vs2010, create empty (win32) project, select dll configuration type,

or after generating project, modify configuration type to dll, see diagram as followings

 

3.2  add .def file to project

3.3   configure export

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值