动态库对外暴露api的方法

1 windows的动态库

在要export的函数声明的前面加上__declspec(dllexport)标识这个函数是从该dll中export出来给其它模块使用的。

declspec是declare specifier的缩写,即声明某种说明符。

 

2 linux的动态库

使用extern关键字标识这个函数是从该动态库export出来的。

posted @ 2017-03-28 15:55  PhoenixTree(梧桐树)  阅读(1051)  评论(0)    收藏  举报