Category Archives: Irritations

Visual Studio Annoyances

This thing could not be more irritating to use.

  • Fatal Error C1902: Program database manager mismatch; please check your installation

    Something to do with debugging. Ignore the lies and rubbish written about mspdb80.dll, just ensure that you are not compiling with “/Zi”. Change Properties -> Configuration Properties -> C/C++ -> General -> Debug Information Format to “C7 compatible”.

  • OpenMP with Visual Studio 2010 Express

    So, although the CL compiler that ships with VS2010 Express supports OpenMP, this feature’s disabled because some files are missing. Specifically:

    • omp.h Although not redistributable, it can be found on github
    • vcomp100.dllInstall the VS 2010 Redistributables
    • vcomp.lib Can be made from the vcomp100.dll. Do:
      dumpbin.exe /exports vcomp100.dll > vcomp
      

      From vcomp, extract the symbol names, and stick them in another file, along with a simple header, viz:

      LIBRARY VCOMP100.DLL
      EXPORTS
      _vcomp_atomic_add_i1
      _vcomp_atomic_add_i2
      ...
      

      Finally make the import library.

      lib.exe /def:vcomp /out:vcomp.lib
      

      Then copy that into Visual Studio’s VC/lib directory

  • But wait! There’s more. Microsoft’s shipped vcomp.lib also includes a magic symbol. Somewhere in your source, you’ll need to add
    extern "C" void _You_must_link_with_Microsoft_OpenMP_library( void ) {}
    

Fettling Ubuntu

Ubuntu’s probably the least-worst option for Linux client machines (this week, at least), but it still takes a bit of hammering to get it into shape. The web is full of idiotic half-solutions to these problems. So, in no particular order, here are my idiotic half-solutions to the things that tweak my blood pressure:

  • Disable product search Oh my, this is an annoying thing. As of Ubuntu 13.ish it seems there’s no single package culpable. The easiest way to shut it up it is to prevent it being able to contact the remote search service by adding to /etc/hosts:
  • 127.0.0.1 productsearch.ubuntu.com
  • Focus follows mouse: as any fule knoe, this is the way it’s meant to be. The magic incantation for this is:
  • gsettings set org.gnome.desktop.wm.preferences focus-mode 'mouse';
    gsettings set org.gnome.desktop.wm.preferences auto-raise  false
    
  • Triple-tap for emulated mouse third-button: Why yes, I do want to run xfig.  Put the below in ~/.bashrc
  • synclient TapButton3=2
  • Two-finger scrolling the right way: this is now the ‘Natural scrolling’ option in settings -> mouse & touchpad
  • Install Microsoft Office: Because friends don’t let friends use the lamentable OpenOrifice. Wine alone is a bit too fiddly, so use the PlayOnLinux wrapper to install Office from your legitimate installation medium.
  • apt-get install PlayOnLinux
  • Disable gnome-terminal confirm-on-quit gnome-terminal pops up a nagging “are you sure?” dialog every time a tab is closed. Change this with: (What’s the difference between gsettings and gconftool-2? Don’t know, don’t care. )
  • gconftool-2 --set -t bool /apps/gnome-terminal/global/confirm_window_close false