Fixing “fatal error C1033: cannot open program database … vc60.pdb” with make and Visual Studio

By neokrates, written on February 24, 2011

howto

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • Which Selenium configurations do you use to test your web front end?

    • We use other tool (80%, 12 Votes)
    • Selenium Grid (13%, 2 Votes)
    • Selenium Grids under CI (like Hudson or TeamCity) (7%, 1 Votes)
    • Single Selenium (0%, 0 Votes)
    • Many Selenium grids on one Server (0%, 0 Votes)
    • Other config (0%, 0 Votes)

    Total Voters: 15

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

Both vc60.pch and vc60.pdb may become locked by Visual Studio, so that Visual Studio cannot write them any more:)
Good thing, it seems that this files will be unlocked soon. Here is the logic implemented in GNU Make which allows to retry the compilation
if that specific type of error happens.

Woks for:

[v] GNU make 3.7x [v] windows XP

Should also work for:

[v] most windows and unix versions [v] older or newer GNU make versions

Basically, I can chain commands inside of GNU make. I can execute the second command only if the first has failed or if the first was successful.

That gives me an option to do something like:

$(COMPILE) || $(VALIDATE_ERROR) && $(WAIT_ON_PDB_ERROR) && \
$(COMPILE_AGAIN) ... etc

And in GNU make syntax, it will be something like

$(MAKE) -f makecommand.mk --no-print-directory all > error.log || $(MAKE) -f grepcommand.mk --no-print-directory all && $(ECHO) pdb/ pch problem, wll wait for 180 sec and retry && $(SLEEP) 180 && \
$(MAKE) -f makecommand.mk --no-print-directory all > error.log || $(MAKE) -f grepcommand.mk --no-print-directory all && $(ECHO) pdb/ pch problem, wll wait for 180 sec and retry && $(SLEEP) 180 && \
$(MAKE) -f makecommand.mk --no-print-directory all > error.log || $(MAKE) -f grepcommand.mk --no-print-directory all && $(ECHO) pdb/ pch problem, wll wait for 180 sec and retry && $(SLEEP) 180 && \
$(MAKE) -f makecommand.mk --no-print-directory all

where:

>less grepcommand.mk
.PHONY all:
	grep "vc60\.pch\|vc60\.pdb" error.log

and

>less makecommand.mk
.PHONY all:
	$(CC) /nologo $(INCLUDE_FILES) $(C_FILES)

The code is not complete here, but you can easily fill the blanks. I have successfully solved the problem in huge make build chain of our enterprise with this one;)

Here is also some info about this error:
http://support.microsoft.com/kb/195386

have fun

 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: -1 (from 1 vote)
0 votes 'YES'  1 votes 'NO'

LEARN MORE (amazon bookstore)

TAGS
No tags for this post.

RELATED
Pages
Posts
    nope :(

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


Leave a Reply