Solved

Visual Studio C++ Windows 7 pdb error

Posted on 2011-09-14
6
1,956 Views
Last Modified: 2012-06-21

Hi,

I copied a project from an XP machine, where everything worked fine, over to a windows 7 machine, where I have the following errors:

1>client : error PRJ0007 : Could not create output directory 'c:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug'.
1>Linking...
1>LINK : fatal error LNK1201: error writing to program database 'c:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\client.pdb'; check for insufficient disk space, invalid path, or insufficient privilege

In actual fact the 'debug' folder has been created by an earlier pass of the compiler and several v80.obj's have been added and other files as well.

At some point the compiler decides it cannot create the debug folder and later the linker decides it cannot write to the pdb.

If I create a separate standalone project and write some test piece of code, then all works fine.

I've tried this starting Visual Studio as admin. Still fails.

I've tried both VS2005 and VS2008, with exactly the same issue.

There is several hundred gig of free space.  

I can delete the debug folder and it will be created, files added, but then fail as above, so it is not a permissions issue.

I've moved everything to a folder right off of c:; same issues. so it is not some pathing issue.

I've stopped and started Visual Studio, rebooted etc... still fails.


Any ideas?

Thanks
Phil



0
Comment
Question by:BeerFizz
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:JimBeveridge
ID: 36539841
Take a look at the eror message. It includes "c:\" twice. This is an invalid path (as noted by the error message) and simply won't work.

If that's not the problem, then download procmon from http://technet.microsoft.com/en-us/sysinternals. Tell it to monitor devenv and filter on a path of the pdb. Build the project and let it fail. Now look at which call fails and what the particular error is.
0
 

Author Comment

by:BeerFizz
ID: 36540053
Hi Jim,

thank you for your response.

There is a space between the two paths.   This appears to be correct and this is the way it is output for what ever reason.   It seems to be describing the base path and then the file/relative path within the base path, if that makes sense.

I'll try the procmon idea and report back.

Phil


0
 

Author Comment

by:BeerFizz
ID: 36540173
Hi Jim,

I did as you suggested wrt procmon and I believe you are absolutely corerct in that the path is invalid.

I have included some of the output from procmon... some of the lines show SUCCESS created and some show NAME INVALID.   Those with NAME INVALID all have the double pathing.

See attached.

Question is, where is this coming from??   I'll look into this further.

Phil

7:11:46.5739822 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\vc80.idb	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.6369400 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\client.pdb	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.6370644 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\ssl.obj	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.6394828 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\client.obj	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.6396441 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\client.exe	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.6443607 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.6444826 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.6576172 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.6577514 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\BuildLog.htm	SUCCESS	Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: None, AllocationSize: 0, OpenResult: Overwritten
7:11:46.6583754 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\vc80.idb	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.7128070 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\client.pdb	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7154362 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\client.exe	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7157501 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7158279 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7166849 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Create, Options: Directory, Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: 0
7:11:46.7167743 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7182741 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7184080 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:46.7427027 PM	devenv.exe	12624	CreateFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
7:11:46.9941253 PM	devenv.exe	12624	WriteFile	C:\Users\phild\Documents\Visual Studio 2005\Projects\gex\client\Debug\BuildLog.htm	SUCCESS	Offset: 0, Length: 4,096, Priority: Normal
7:11:47.0366419 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
7:11:47.0367792 PM	devenv.exe	12624	CreateFile	C:\users\phild\documents\visual studio 2005\projects\gex\client\ c:\users\phild\documents\visual studio 2005\projects\gex\client\debug\	NAME INVALID	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

Open in new window

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 7

Accepted Solution

by:
JimBeveridge earned 500 total points
ID: 36540428
Look in your project properties in Visual Studio for where paths are specified, particularly the path for the pdb file. As you make changes, look at the Command Line property to see which property affects the result.
0
 

Author Comment

by:BeerFizz
ID: 36546026
Could not find anything at all using the project properties... so i edited the *.vcproj file and compared it with  one from a new project I had created.   The main difference that I could find which looked like it might have affected things was the a line in both the debug and release config which was there in the project that failed and not in the new project.  The line was 'OutputFile'.  I deleted it from both configs and all worked as it should.

<Tool
	Name="VCLinkerTool"
	...
	OutputFile=" $(SolutionDir)$(ProjectName)\$(ConfigurationName)\$(ProjectName).exe"
	...
/>

Open in new window

0
 

Author Closing Comment

by:BeerFizz
ID: 36546032
Thanks for you assistance.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now