static library 与shared dll 区别
来源:互联网 发布:淘宝店铺名称 服装 编辑:程序博客网 时间:2024/06/15 23:25
used in a static library:
使用lib文件。lib是已经编译好的二进制文件,可以与你的工程静态链接起来成为一个exe。
也是就是 比如你用到这个库里的函数,这些函数代码(二进制代码)都拷贝到你的代码程序里来了,所以运行时可以直接找到这些函数,所以可以在没有这些库的机器上运行
used in a shared dll:
使用dll文件,函数实现隐藏在DLL文件内部,你的工程编译成exe文件后,运行时才调用dll
也就是说 当你用到这些库里的函数时,这些函数代码并没有被拷贝到你的程序中来,而是把这些函数是属于哪个库及它们在库中的地址等信息记录下来。。。所以当你的程序运行时,当用到这些函数时,会根据已记录下的信息把函数所属的库加载进地址空间来,再找到要运行的函数地址,这样才可以运行。。。
所以运行你的程序的机器必须要有这些函数所属的库
以下摘自AFX.H文件。
『
进入点函数的选择是由C运行库进行的。
在TCHAR.h中将_tWinMain 定义为 WinMain函数,却没有UNICODE版本的进入点函数。所以在MFC的UNICODE中要自己定义进入点函数wWinMainCRTStartup
而在没有MFC的WIN32程序中使用UNICODE则一点问题都没有而且UNICODE和_UNICODE分开定义
』
可以在LINK ProjectOption中设定如下:/verbose:lib 来查看导入了哪些库。
以上,部分转载自:http://shareganku.blog.com.cn/archives/2007/2238006.shtml
- static library 与shared dll 区别
- Use MFC in a Static Library 和 use MFC in a Shared DLL 区别
- Use MFC in a Static Library 和 use MFC in a Shared DLL 的区别
- Use MFC in a Static Library 和 use MFC in a Shared DLL 在运用上有什么区别?
- Use MFC in a Static Library 和 use MFC in a Shared DLL 在运用上有什么区别
- Use MFC in a Static Library 和 use MFC in a Shared DLL 在运用上有什么区别?
- use MFC in static LIB与use MFC in shared dll在下面这段程序的区别
- Android NDK static shared library
- gcc - shared library vs static library
- Shared Library, Static Library Technical Notes
- shared library (.so) and static libarary (.a)
- 关于Use MFC in a Shared DLL和Use MFC in a Static Library 转换遇到的问题
- Android Failed to load the JNI shared library jvm.dll
- Failed to load the JNI shared library jvm.dll
- Failed to load the JNI shared library jvm.dll
- Failed to load the JNI shared library jvm.dll
- Failed to load the JNI shared library jvm.dll
- Failed to load the JNI shared library jvm.dll
- Tomcat内存设置方法
- Unicode环境下宽字符CString与ANSI字符const char* 的转换
- 类与结构的区别
- 测试为Android模拟器创建和管理sdcard image文件
- flex自定义分页控件
- static library 与shared dll 区别
- Hibernate一对多双向关联及inverse的作用
- ABAP-Debug background job
- Linux负载均衡视频
- 使用 StringBuilder 类请参见 字符串追加
- 修改Notepad++的默认字体
- Demonoid 简介
- sqldatareader 和 sqldataadapter 、dateset的比较
- 木偶剧《Corpse Bride 僵尸新娘》:温馨 浪漫