MrTools

Hi,

I've installed VS 2005 C++ Express into source control and it won't work. I've wasted the better part of a day so far trying to get it to work. The error message I get when trying to run something as simple as lib.exe is:

"The system cannot execute the specified program."

When I load up the .exe in the dependency walker (depends.exe), it says:

Error: The Side-by-Side configuration information in "y:\compilers\Microsoft Visual Studio 8\VC\bin\LIB.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).

The only dependency shown for LIB.EXE other than KERNEL32.DLL is MSVCR80.DLL.
I've tried copying all the redistributable DLLs from the Microsoft.VC80.DebugCRT folder (msvcm80d.dll, msvcp80d.dll, msvcr80d.dll) and the manfest (Microsoft.VC80.DebugCRT.manifest) into the VC\bin directory, but it has no effect.

I've had 2003 working just fine for a long time without any problems but can't get this to work for the life of me. I've gone through tons of threads and posts about this issue and cannot ever get it to go away. For the love of GOD, does anyone have any idea how I can get this to work :)




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

Most probably this is because you used the debug CRT instead of the release CRT. VC++ does not use the debug CRT, only the apps you compile with VC++ in debug mode use it.

Copy the dlls and the manifest from Microsoft.VC80.CRT folder.





Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

Already tried that too.




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

Did you installed SP1 beta for VS That one brings in newer versions of the crt files, maybe you copied older ones



Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

Mike Danes wrote:
Did you installed SP1 beta for VS That one brings in newer versions of the crt files, maybe you copied older ones


I haven't installed SP1 beta for VS. Checking just now, the manifest says:

version="8.0.50608.0"

And the dependency walker reports MSVCR80.DLL as being version 8.0.50727.363




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

8.0.50727.363 - this is the SP1 version

8.0.50608.0 - I don't know what's this, it's older than the release version of VS2005, I saw such a manifest in Windows SDK bin directory.

Try changing the version in the manifest file to 8.0.50727.363. Also check what version lib.exe is.





Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

I can't imagine how an SP1 version of a DLL could get on my system. Are you sure the 8.0.50727.363 version is from SP1 I did a clean install of VC++ 2005 Express on a clean win2k3 system and it shows MSVCR80.DLL as being 8.0.50727.363 too.

The File Ver and Product Ver of LIB.EXE is listed as 8.0.50727.42, yet another version. I tried editing the manifest file to change to different versions, but that didn't work either.  hmf.

EDIT: I just noticed that even VCExpress.exe.manifest has the 8.0.50608.0 version.  WTH







Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

I'm running out of ideas. I looked at the lib.exe manifest file and it also uses 50608. That means that it should work with any CRT with a build.revision number equal or above be it 50727.363 or 50727.42 because of backward compatibility. Try installing the vc redist on the machine were you want to run VC++:

http://www.microsoft.com/downloads/details.aspx FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&DisplayLang=en





Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

Well, problem is it actually runs from the machine locally from C:. Just not after I added it to source control which is mapped to a different drive letter (Y: in this case). For example:

C:\Program Files\Microsoft Visual Studio 8\VC\bin>lib.exe
Microsoft (R) Library Manager Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
...

but

C:\Program Files\Microsoft Visual Studio 8\VC\bin>Y:

Y:\compilers\Microsoft Visual Studio 8\VC\bin\>lib.exe
The system cannot execute the specified program.


So I'm inclined to think that installing the redistributable package won't do anything, but I'll try it.
EDIT: yeah, that didn't work either. :(




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

Hmm... what's getting weird. What's that Y: drive anyway



Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

Mike Danes wrote:
Hmm... what's getting weird. What's that Y: drive anyway


It's a ClearCase dynamic view.




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Mike Danes

Strange. Since it's working from C: but does not work from Y: it's probably something in the way Y: works that confuses the manifest parsing code but hard to say what and to find a solution.



Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

MrTools

I have a faint memory of some kind of fix for FAT32 drives for strange assembly problems.. I wonder if the same fix (whatever it is) could be applied in this case too. Unfortunately I can't remember much off the top of my head about what the work-around was or the particular problem.




Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Vic10

I discovered something similar in recent dealings with VS2005.

After compiling and linking successfully, trying to run the exe got the following error message:

Unable to start program ' ... '

This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application even log.

Of course, nothing in the app log, though the system log had a few useless entries. The manifest file at least had something to search on, the useful lines being:

<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.363" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

<assemblyIdentity type="win32" name="Microsoft.VC80.DebugOpenMP" version="8.0.50727.363" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

as we don't actually use OpenMP in our code, but one of the libraries we use does, this led (after some blood and tears) to us figuring out that the libraries were being compiled and linked on a machine with the VS2005 SP1 beta installed. As another poster here mentions, that installs new versions of various dlls, which get embedded as dependencies. Then, when those libraries get propogated and linked against, the exe's manifest gets those dependencies as well - which aren't on my (or your) machine.

One of Clearcase's features is that is reuses object files (and presumably lib files, as well) compiled by other people. However, as my system showed, the dependency checking of VS2005 is obviously a bit faulty when dealing with versioned system dlls like this.

My solution was to simply manually recompile all the dependent libraries. Fortunately, the source code came with our license. Another solution is likely to install SP1, though that is not a step we are taking yet, so I can't say for certain that this would work - I'm going to make an educated guess that it would.

Hopefully this helps you, if you haven't figured it out already, then at least some other person down the line who searches on this problem.





Re: Visual C++ General VC++ won't run from source control: "The system cannot execute the specified program"

Damien Watkins - MSFT

Hello

Just checking, did you try Vic10s suggestion and did it work

Thanks

Damien