Multi-processor compilation in older Visual Studios

Thu, Jan 19, 2012

I’m working from home today due to Seattle’s OMGSNOWPOCALYPSE2012. Lamenting the lack of IncrediBuild here at home, I decided to parallelize my builds - if only across four cores instead of across the entire office. Visual Studio 2010 has an option for parallelizing C++ builds within a single project (as opposed to parallelizing the building of multiple projects, which has long been supported) in the project configuration properties under C/C++ → General → Multi-processor Compilation.

MSVC and Templates

Tue, May 31, 2011

template <typename A> class Foo { public: Foo() { Bar<A> b; b.method(); } }; template <typename A> class Bar { public: void method() {} }; int main( int argc, char** argv ) { Foo<char> f; return 0; } Take a look at this snippet of code. Does it look valid to you? On first glance, it might. But if you run it through your compiler… hmm, wait.. MSVC thinks this is valid code too.

Manifest gotchas

Fri, Dec 25, 2009

For those of you using Visual Studio 2008, and using it’s C++ TR1 support in SP1, here’s something I wish I hadn’t spent so much time tracking down.. TR1 features only exist in 2008 SP1, but the linker will happily build a manifest to link against the pre-SP1 CRT even if you’re using TR1. Some systems (including your development machines) will have proper side-by-side library redirection from the old CRT to the new one.