ATC :: Since February 2001

Subscribe to ATC Send e-mail to Rob

I work at Pelco. The opinions expressed here are my own, and neither Pelco nor any other party necessarily agrees with them.

View Rob Fahrni's profile on LinkedIn
My Wish List


Krusty will code C++ for food.
MarsEdit: Powerful Blog Authoring Made Simple. Need a Snow Day?
Harry Potter Automatic News Aggregator
Green Hosting! This site is hosted by Dreamhost.

Tuesday, July 29, 2008

Strange behavior, a fix - [12:49 PM]

Watch out! It's a blog fly!I've figured out my problem from last night, so I thought I'd share with everybody, just in case you run across it.

First off here's my configuration, it plays heavily into the problem.

1) MacBook Pro
2) VMWare Fusion
3) Windows XP, running in VM
4) Shared fold on Mac for source code
5) Visual Studio 2008
6) Trolltech Qt

The big cluprit, the shared folder on the Mac. For some strange reason Visual Studio will lose its' brain after a while and can no longer write to .IDB/.PDB files on the HPFS volume. There's a lot going on in there, so it could be anything causing the problem. Anywho, to fix my problem I made sure all intermediate and binary files are being written to my XP volume, not the shared drive. It was easy to fix because we use environment variables to direct Visual Studio to the root of our codebases and where to write intermediate and finished binary files, there was one little problem. We auto generate our Visual Studio project files using a program, from Trolltech, called qmake. It's part of Qt, and is quite handy, but in this case it requires a small 'fix' to get around this problem.

By default qmake sets C/C++ > Output Files > Program Database File Name to '.', which in my case would write the .IDB/.PDB files to the shared Mac volume, which causes the strange behavior. No worries! We have the source code to qmake, so you need to make the following change to 'fix' this problem.

Open the file msvc_vcproj.cpp from \Qt\4.4.0\qmake\generators\win32, in the method initCompilerTool(), line 988 in Qt 4.4.0.

Change this...

conf.compiler.ProgramDataBaseFileName = ".\\" ;
To this...
conf.compiler.ProgramDataBaseFileName = placement;
Rebuild qmake, and run qmake over your project files. That should help.

The real fix is this, do not build to your shared Mac drive, there's some sort of caching/permissions problem with it.

Oh, here's the original problem.
fatal error C1090: PDB API call failed, error code '23' : '(
And all you Open Source zealots, please don't point out we have the code. We paid for it, and if they were shipping a binary only version they wouldn't have hard coded these settings. They would've been configurable, so I wouldn't have had to touch the code.

Labels: , , , ,

Click here for a permalink to this entry. comment