Visual Studio 2010 SP1 has been released

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

For those who are using Visual Studio 2010, the service pack has now been officially released: Visual Studio 2010 Service Pack 1 General Availability - Visual C++ Team Blog - Site Home - MSDN Blogs Edit: The download like doesn’t seem to work for me yet, given that it’s only gone General Availability today it might be worth checking back a little later. Edit again - we have a general availability download link: http://www.

If your VS2010 C++ build is constantly rebuilding a project that hasn’t changed

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Check if you’re seeing the following output in the build pane: InitializeBuildStatus: Creating ".unsuccessfulbuild" because "AlwaysCreate" was specified. I’ve just fixed a bunch of these errors in one of our solutions here and all of these were caused by one of two issues: The project file referenced files that were no present in the source tree A custom build step either was supposed to generate a file but didn’t, or the file ended up in the wrong place In order to find out if there are missing files that trigger the perma-rebuild, you’ll also have to enable Visual Studio’s debug output as described in this stackoverflow answer.

How to view undecorated DLL-exported C++ symbols in Visual Studio 2010

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Yes, it’s one of those “note to self” posts, but I keep forgetting how to do it. As the first step, you run dumpbin /EXPORTS and redirect the output into a file because the utility that unmangles the names (undname.exe) doesn’t appear to be able to take piped input via stdin. Then, run undname , with being the file that contains the exported symbols. At least that way the symbols become mostly readable.

Boost.Log, preventing the ‘unhandled exception’ in Windows 7 when attempting to log to the event log

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I recently ran into a requirements for retrofitting a logging library to an existing project. My first instinct was to throw Pantheios at it as I’ve used it before and It Just Worked. Unfortunately in this case, we needed the ability to log to more than two event sinks and it looked like this was getting a little awkward with Pantheios, which prompted me to look at Boost.Log. After some digging through the documentation and the samples, I managed to get the logging going to the three event sinks we needed.

A couple of noteworthy links

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

It’s bit of a link roundup from the past couple of months. Most of you probably saw these already as I’d think you’re probably reading the same blogs. C++ links VS2010 SP1 Beta: What’s in it for C++ developers. While I’m not going to chance installing the beta on my main developer workstation, it looks like there are some interesting features in the service pack. I hope that the IDE stability has also been improved.

Sometimes, std::set just doesn’t cut it from a performance point of view

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

A piece of code I recently worked with required data structures that hold unique, sorted data elements. The requirement for the data being both sorted and unique came from it being fed into std::set_intersection() so using an std::set seemed to be an obvious way of fulfilling these requirements. The code did fulfill all the requirements but I found the performance somewhat wanting in this particular implementation (Visual Studio 2008 with the standard library implementation shipped by Microsoft).

Quick tip if you see ‘bad DLL or entry point msobj80.dll’ when building software with VS2008

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Try stopping mspdbsrv.exe (the process that generates the pdb files during a build) if it is still running. My understanding is that it’s supposed to shut down at the end of the compilation but it seems that it can turn into a zombie process and if the latter happens, you can get the above error when linking your binaries. Anyway, I just ran into this issue and stopping the process via the Task Manager resolved the issue for me.

On combining #import and /MP in C++ builds with VS2010

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I’m currently busy porting a large native C++ project from VS2008 to VS2010 and one of the issues I keep running into was build times. The VS2008 build uses a distributed build system; Unfortunately the vendor doesn’t support VS2010 yet, so I couldn’t use the same infrastructure. In order to get a decent build speed, I started exploring MSBuild’s ability to build projects in parallel (which is fairly similar to VS2008’s ability to build projects in parallel) and the C++ compiler’s ability to make use of multiple processors/cores, aka the /MP switch.

Using CEDET-1.0 pre7 with Emacs 23.2

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

It’s been mentioned in several places that GNU Emacs versions sometime after 23.1.50 do come with an integrated version of CEDET. While I think that’s a superb idea it unfortunately managed to break my setup, which relies on a common set of emacs-lisp files that I hold under version control and distribute across the machines I work on. Those machines have different versions of GNU-based Emacsen (pure GNU, Emacs/W32, Carbon Emacs etc) so I can’t rely on the default CEDET.