Visual Studio C ++是否可以编译对象而不进行链接 [英] Is it possible for Visual Studio C++ to compile objects without linking
问题描述
我运行的是VS 2010 SP1,我有一个特殊的分析配置,每周运行一次(因为它需要很长时间的构建服务器来分析一切)。
I'm running VS 2010 SP1 and I have a special analysis configuration that runs once a week (because it takes a long time for the build server to analyze everything).
我希望此配置运行,而不必麻烦链接。如果分析通过了项目中的所有代码,那么我希望该构建只继续到下一个没有链接的项目。
I'd like this configuration to run without bothering to link. If the analysis passes for all the code in a project, then I'd like the build to just continue on to the next project without linking.
我看不到一种方法告诉VS只是运行C ++编译器没有链接。有没有人知道一个方法,在现有的vcxproj中这样做?
I can't see a way to tell VS to just run the C++ compiler without linking. Does anyone know of a way to do this within an existing vcxproj?
澄清:我想在IDE内工作。
Clarification: I'd like this to work from within the IDE.
的行为是手编辑vcxproj,看看我是否无法摆脱建立的链接阶段。
My next course of action is hand editing the vcxproj to see if I can't get rid of the link phase of building.
推荐答案
这个情况;尝试在使用IDE时不进行链接。
Just in this situation; trying to build without linking when using the IDE.
为了实现这个配置,我改变了我的应用程序的配置类型:
To achieve this for my configuration, I've altered the configuration type of my application:
General -> Project Defaults -> Configuration Type
具体来说,从 $ c>到
静态库(.lib)
。这将允许您的所有项目生成,但不要求发生任何链接。
Specifically, changing from Application (.exe)
to Static library (.lib)
. This will allow all your project(s) to build, but not require any linking to occur.
这篇关于Visual Studio C ++是否可以编译对象而不进行链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!