链接器只能生成导入库(没有链接和优化整个DLL)吗? [英] Can linker only produce import library (without linking and optimizing the entire DLL)?

查看:60
本文介绍了链接器只能生成导入库(没有链接和优化整个DLL)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于构建并行化的性能原因,我们希望通过首先生成导入库来加快链接过程。这是因为当DLL项目依赖于另一个DLL项目时,它实际上只需要它的导入库开始链接
,并且之后可以异步链接所依赖的实际DLL(在运行时需要它,而不是编译时) )。 


是否有任何选项可以说服链接器首先只生成导入库?由于所有优化工作,得到了一些链接几个最小项目的项目。我知道我可以轻松地从.DEF文件生成导入库,但我们使用__declspec(dllexport)
代替。也许有一种简单的方法可以从所有静态库和提供给链接器的obj文件中提取.DEF文件,如果我们不能说服它只生成导入库的话?

解决方案

请参阅
链接器选项

For performance reasons of build paralellization, we would like to speed up linking process by first producing the import library only. This is because when a DLL project depends on another DLL project, it really only needs its import library to begin linking and the actual DLL depended upon can be linked asynchronously afterwards (it's needed at run-time, not compile-time). 

Are there any options to convince linker to produce only the import library first? Got some projects that link several minues due to all optimizations being done. I know I can produce import library from .DEF file easily but we use __declspec(dllexport) instead. Maybe there is an easy way to extract a .DEF file from all static libraries and obj files being supplied to the linker if we can't convince it to produce only the import library?

解决方案

See Linker Options.


这篇关于链接器只能生成导入库(没有链接和优化整个DLL)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆