Sth. about Static Library
2009-10-12 10:02
253 查看
static library.. 我就不解释是什么了.
最近发现有这样2 个问题:
1. release 版输出的 .lib 文件通常比debug 版要大好多.
google 了一下说是优化惹的祸. 以vs2005 为例, 具体的选项是: project property ==> configuration properties ==> c/c++ ==>optimization ==> "whole program optimization". 下面的解释是说把代码生成delay 到最终exe 的link time, 可想而知... 于是统统改成不要优化, 硬盘空间顿时省了不少, link 的时候也快多了.
2. 不同版本的编译器, 编译出来的static library 不能混用.
M$ 官方就这么说的. 而 dynamic 的记得是可以的.
最近发现有这样2 个问题:
1. release 版输出的 .lib 文件通常比debug 版要大好多.
google 了一下说是优化惹的祸. 以vs2005 为例, 具体的选项是: project property ==> configuration properties ==> c/c++ ==>optimization ==> "whole program optimization". 下面的解释是说把代码生成delay 到最终exe 的link time, 可想而知... 于是统统改成不要优化, 硬盘空间顿时省了不少, link 的时候也快多了.
2. 不同版本的编译器, 编译出来的static library 不能混用.
M$ 官方就这么说的. 而 dynamic 的记得是可以的.
相关文章推荐
- Sth. about Static Library
- Android NDK about Library (static library , share library and 3rd party library)
- Android NDK about Library (static library , share library and 3rd party library)
- How to build cURL static library with SSL support on Windows
- Objective-C categories in static library链接库真实链接的大小
- 使用静态库(使用Cocoa Touch Static Library模板)
- Objective-C categories in static library
- gcc - shared library vs static library
- BUILD_JAVA_LIBRARY与BUILD_STATIC_JAVA_LIBRARY
- sth about "批处理文件"(2)
- sth about interview
- Objective-C categories in static library
- How to use gcov to get code coverage from static library in iphone?
- Sth about java security
- iOS Static Library 静态类库
- [Linux] static library & dynamic library
- Building c++ static library for iPhone
- Objective-C categories in static library
- IOS创建静态库Cocoa Touch Static Library
- How do I fix "selector not recognized" runtime exceptions when trying to use category methods from a static library?