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.
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?
[Edit] Clarification: I'd like this to work from within the IDE.
My next course of action is hand editing the vcxproj to see if I can't get rid of the link phase of building.
The -c option in the command means compile (but don't link). The result of this will be .o (object) files. Try the command without the -c , it should link and create your snmpy executable. Save this answer.
The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.
open a loose folder of source files with no project file. Visual Studio will use heuristics to build the files. This is an easy way to compile and run small console applications.
Ctrl+F7 will compile only the active source file.
The C++ compiler cl.exe
certainly can, that's the /c
switch (compile only, don't link). Not sure about the msbuild
system that the IDE uses and that works with .vcxproj
files, though.
According to the documentation, this should work:
msbuild /target:Compile projectfile
or
msbuild /target:projectname:Compile solutionfile
You might also be interested in the /filelogger
and /fileloggerparameters
options, which let you capture build messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With