Link Error With Visual Studio 2005 Using Windows SDK 7.1 - c++

I am in the process of evaluating an upgrade to Windows SDK 7.1
Part of my team's legacy codebase is a large number of ATL web services, which are still maintained using Visual Studio 2005 because (I am told) ATL web services are not supported in versions beyond 2005.
When I pointed the IDE to SDK 7.1, I began to receive the following link error:
uuid.lib(cguid_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module
I haven't been able to find much on the web related to this problem in VS2005 and SDK 7.1.
I found some forum posts from back in 2005 about the same error -- they seemed to indicate an SDK incompatibility.
Based on the download page, I was under the impression that Windows SDK 7.1 could be used with Visual Studio 2005 (although I do note the "Not all features work with all versions of Visual Studio" disclaimer).
Is this a known issue, or have I got something configured incorrectly?
I was hoping someone could share their experience or suggest how/if I might be able to resolve this.
EDIT:
I discovered that this problem is circumvented by disabling /DEBUG on the linker command line. While allowing the build to complete, this is suboptimal as it precludes debugging during future maintenance.

The hotfix listed here appears to address the link error. Not sure how I missed it before.
Including here in case anyone ever searches for it using similar language.

Related

Missing vc_runtimeminimum_x86.msi and installation won't work

I'm currently going through the installation process for Visual Studio 2017 Community Edition to use with C++. Halfway through installation, I get an error stating
"The feature you are trying to use is on a network resource that is unavailable. Click OK to try again, or enter an alternate path to a folder containing the installation package 'vc_runtimeMinimum_x86.msi' in the box below."
If I hit cancel, the procedure continues and at the end tells me that the setup has failed. It gives me the error logs attached at the bottom of this post.
Also, I have uploaded the complete logs on the Microsoft Visual Studio developer help forum here.
I'd like to be able to solve this problem without having to do a re-installation of the OS. So far, I've tried /sfc scannow, repairing through the Visual Studio Installer, and reinstalling the C++ redistributables, but all too no avail.
Any help would be greatly appreciated. Thank you.
The product failed to install the listed workloads and components due to one or more package failures. Incomplete workloads Desktop development with C++
(Microsoft.VisualStudio.Workload.NativeDesktop,version=15.0.26403.0)
Universal Windows Platform development
(Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Visual Studio extension development
(Microsoft.VisualStudio.Workload.VisualStudioExtension,version=15.0.26208.0)
Incomplete components C# and Visual Basic
(Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
C++ profiling tools
(Microsoft.VisualStudio.Component.VC.DiagnosticTools,version=15.0.26208.0)
Graphics debugger and GPU profiler for DirectX
(Microsoft.VisualStudio.Component.Graphics.Tools,version=15.0.26208.0)
JavaScript and TypeScript language support
(Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26208.0)
Profiling tools
(Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26208.0)
Static analysis tools
(Microsoft.VisualStudio.Component.Static.Analysis.Tools,version=15.0.26208.0)
Universal Windows Platform tools
(Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26403.0)
Universal Windows Platform tools for Cordova
(Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.0.26403.0)
Universal Windows Platform tools for Xamarin
(Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
VC++ 2017 v141 toolset (x86,x64)
(Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=15.0.26208.0)
Visual Studio extension development prerequisites
(Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites,version=15.0.26208.0)
Visual Studio SDK
(Microsoft.VisualStudio.Component.VSSDK,version=15.0.26208.0) You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine. Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds. Package
'Microsoft.VisualCpp.Redist.14,version=14.10.25008,chip=x86' failed to install. Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=1603 Impacted workloads Desktop development with C++
(Microsoft.VisualStudio.Workload.NativeDesktop,version=15.0.26403.0)
Universal Windows Platform development
(Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Visual Studio extension development
(Microsoft.VisualStudio.Workload.VisualStudioExtension,version=15.0.26208.0)
Impacted components C# and Visual Basic
(Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
C++ profiling tools
(Microsoft.VisualStudio.Component.VC.DiagnosticTools,version=15.0.26208.0)
Graphics debugger and GPU profiler for DirectX
(Microsoft.VisualStudio.Component.Graphics.Tools,version=15.0.26208.0)
JavaScript and TypeScript language support
(Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26208.0)
Profiling tools
(Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26208.0)
Static analysis tools
(Microsoft.VisualStudio.Component.Static.Analysis.Tools,version=15.0.26208.0)
Universal Windows Platform tools
(Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26403.0)
Universal Windows Platform tools for Cordova
(Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.0.26403.0)
Universal Windows Platform tools for Xamarin
(Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
VC++ 2017 v141 toolset (x86,x64)
(Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=15.0.26208.0)
Visual Studio extension development prerequisites
(Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites,version=15.0.26208.0)
Visual Studio SDK
(Microsoft.VisualStudio.Component.VSSDK,version=15.0.26208.0) Log
C:\Users\Owner\AppData\Local\Temp\dd_setup_20170412231725_117_Microsoft.VisualCpp.Redist.14.log
Details Command executed:
"C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.10.25008,chip=x86\VC_redist.x86.exe" /q /norestart /log "C:\Users\Owner\AppData\Local\Temp\dd_setup_20170412231725_117_Microsoft.VisualCpp.Redist.14.log"
Return code: 1603 Return code details: Fatal error during installation.
I ran into this problem as well on a recent build of Win 10 + trying to install latest VS Community. When I entered this state, things appeared to be super broken. Here's the sequence of events that I took which finally worked:
In the installed, select to "download all packages and then install"
Attempt installation
See the popup
With the popup still up, go here: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed and download the tool
Open the tool and then select "Uninstall" on the page it says "do you need help installing or uninstalling"
On the next page with the list, select Microsoft Visual C++ 2015 (whatever) and hit next to "Try Uninstall"
Repeat steps 5 - 6 until I didn't see any "Microsoft Visual C++ 2015" left in the list. Note that the popup is still showing.
Close the popup
Pause the install and Resume it.
I didn't see the pop up again and it appears to have installed correctly.
If you're coming here a year after the solution was marked without any resolution, try that and see if it works around the issue for you.
Here are some other things I tried which didn't work for me. If the above didn't work for you, maybe try some of the following which I collected through some searching:
Going to C:\Program Data\Package Cache, searching for the msi package, giving the installer the literal path to what I found. Installer complains "wrong version"
Using https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed after the install failed and then repairing (same error).
Uninstalling VS 2015 packages after install failed and repairing (same error).
Ignoring the error. When I did this, VS didn't have any templates installed and devenv /installvstemplates didn't solve this.
Go to Control Panel--Programs and Features, uninstall the Visual C++ 2015 Redistribute items.
After that, run the tool: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed. Re-run the VS 2017 installer as administrator, then click the icon besides 'Launch' and choose 'Repair' to repair the VS 2017.
This tool from Microsoft (which was mentioned by others here) worked for me, after I had been searching for an answer for days:
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
You have to choose the "I have problems uninstalling" and search for your "C++"-components (in your case the 2017 ones).
There are usually the "Minimum runtime" and the "Additional runtime"-components. After I've uninstalled both of them with this tool, I could just install a programm that uses these runtimes (for example Visual Studio) and it would download and install the missing features, after that, everything workes perfect for me.
Try installing all the things from here: https://support.microsoft.com/ms-my/help/2977003/the-latest-supported-visual-c-downloads
Not sure if you just have to install the x86 version or all of them. recommend that you install all of them but remember to uninstall the ones which you already have.
for me was simple to fix this problem.
Uninstall all visual c++ with Revo Uninstaller Pro
Use MPVCI tool. link(https://www.majorgeeks.com/files/details/multipack_visual_c_installer.html)
enjoy it. for me it works.

How to compile C++ for Windows with clang in Visual Studio 2015

As far as I understand, Visual Studio 2015 is shipped with clang. First I though this was only for Android and iOS apps, but according to this article it should also be possible to use the clang++ frontend for Windows programs. However, I can't find the according option.
So could you please explain to me, how I can change the used compiler to clang in a c++ project (in VS2015 RC Community Edition).
Starting with VS2015 Update 1 you can install the "Clang with Microsoft CodeGen" template via the New Project window, browse to Installed -> Templates -> Visual C++ -> Cross Platform.
You will then be able to choose the Clang 3.7 with Microsoft CodeGen v140_clang_3_7 Platform Toolset in the properties page of any Windows C++ project.
Clang has a completely different set of command-line options which it recognizes, so when using the v140_clang_3_7 toolset, the project properties must be using Clang-compatible options, which can be recognized as starting with - instead of /. For example, Debug Information Format property set to "Full Debug Information (DWARF2) (-g2 -gdwarf-2)", and Enable C++ Exceptions property set to "Yes (-fexceptions)".
There's more information in this blog post.
As far as I understand it both Clang and GCC are shipped with the Android and iOS crossplatform SDKs/tools for Visual Studio 2015.
From what I've seen it only allows me to choose those while having one of those crossplatform projects.
Using the template project for a GLES C++ application you get the following options:
While for a Windows C++ application you get the dialog below where you can see that Windows target platform is grayed out and read-only, meaning you probably have a set of toolkits for each target platform, but you simply cannot change it, at least for now.
Have no idea how you turn a normal VS project into crossplatform though, and it's likely that you can only target Android or iOS out of the box using 3rd party compilers.
It may be possible, though, to install Clang as another toolkit in the same way the XP toolkits are. So perhaps it's just a matter of someone fiddling with it and making it available as it is already installed.
Caveat: This answer is pre-VS2015 update 1 which didn't have the "Clang with Microsoft CodeGen" option.
After reading through the linked post and especially the comments again, I came to understand, that this is not a feature shipped with VS2015 RC but a possible future feature that might e.g. be shipped in a SP or (more likely) with the next version of VS.
As mentioned by sjdowling, the closest thing you can do at the moment (October 2015, clang 3.7) is to download and install llvm for windows. This should give you a LLVM-vs2014 platform toolset option. For me it works for simple test programs, but apparently this version of "clang-vs" seems to not yet support exceptions. However, according to these notes, that problem should be mostly solved for clang 3.8.
While the above solutions work they require that you have installed clang which is off by default in the visual studio 2015 installation. The accepted answer does show how to install it, though the next page will ask you to close visual studio which you are running the new project from.
If anyone is wondering how to install clang because it does not show up in their list here is another solution:
Control Panel->Programs->Programs and Features.
Right click on “Microsoft Visual Studio Enterprise 2015” (or
“Microsoft Visual
Studio 15 Preview” if you have the preview of the next version of
Visual Studio installed)
Click “Change”
Click “Modify”
Select “Clang with Microsoft CodeGen” – The March 2016 release.
https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/

Visual Studio /SUBSYSTEM:POSIX not appearing in 2008

I have installed visual studio 2008 Professional Edition and I am not able to set /SUBSYSTEM:POSIX option in one of the visual C++ projects. I also installed Visual Studio Debugger addin from SUA but still same. Please see attached screenshot for version information.
Thanks
Niraj Rathi
It's gone. However, Visual Studio does provide a bunch of header files to provide functionality that gets close (but not the same), such as direct.hfor directory operations.
Currently, the best way of getting POSIX on Windows is probably Cygwin or it's friends.
There is Windows Services for UNIX (SfU), but according to some it was quite close to what Cygwin was in 2006. Seeing how Cygwin and some of its comrads are live and well and SfU did not see an update in over half a decade, I would choose the former any day of the week.
If you are interested in a blast from the past, checkout this little nugget from 2006 which is Microsoft's official How to port from UNIX to Windows website. It seems rather useless, but funny what Microsoft thought is "useful" in 2006.

Is there a summary of visual studio 2008 runtime versions?

I've been looking into a strange problem where loading of one of our application's dlls fails on certain systems (using the Global Flags loader snap flag shows it's somewhere within LoadLibraryEx). The logs in windbg show that there seem to be several different versions of MSVCR90.DLL being referenced. It appears that the version referenced in our manifest is different to the redistributable runtime we're installing.
I've been trying to find a definitive list of the different runtime versions for the Visual Studio service packs and security hotfixes, but I can't find anything useful.
On my own machine I have at least five different ones installed, but I can't relate them to what Visual Studio is building. This is what I've found up to now:
9.0.21022.8 - this is what my VS2008 SP1 machine appears to be building against
9.0.21022.218: Security update for VS2008
9.0.30729 ?
9.0.30729.17 - VS2008 SP1 http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
9.0.30729.4148 - VS2008 SP1 28/7/2009 (also seems to include the ATL update) http://support.microsoft.com/kb/973552 http://support.microsoft.com/kb/971092/
9.0.30729.4974 - seems to be part of Team Foundation Server 2010
9.0.30729.5570 - 21 April 2011 security update http://support.microsoft.com/kb/2465361
Is there a more complete list than this, or one that clarifies which version we are building?
What is a fully-patched Visual Studio 2008 installation? SP1 + ATL hotfix? Are there further security updates?
EDIT:
I've found this page which does at least put all the downloads in one place: http://support.microsoft.com/default.aspx?scid=kb;en-us;2019667&sd=rss&spid=12913
EDIT2:
It appears that merely updating to the most recent visual studio libraries doesn't automatically use them -- you need to explicitly bind to the latest library version
Run Microsoft Update (not Windows update) and it'll patch you up to the very latest version. There are a few of them (5 or 6 IIRC).
I know this is an old thread, but for the benefit of future readers, I have one here: http://niemiro.co.uk/Blog/windows-update-troubleshooting/visual-c-file-versions/
It isn't totally complete yet, but it has more than what is currently posted in this thread, and I haven't yet found a better list.
If you have anything to add, a comment here would be greatly appreciated, and I will add it when I get the chance.

Using Visual Studio 2010 C++ compiler and linker without Visual Studio 2010 having been installed

At my company we really like for our development tools to be able to be used from perforce, without having been installed. For a lot of tools (perforce, gcc compiler, snc compiler, even maya) this works after some tweaking, but for Visual Studio 2005 we could not get it to work. As far as we could see, the problem was caused by mspdbsrv.exe. When VS2005 was not installed, the linker would regularly exit with an error about a corrupt pdb. When VS2005 is installed, we almost never see this error.
Does anybody know if this is possible with Visual Studio 2010?
See here. This will install compilers, headers, and win32 development tools if you select them. Exactly what you need: toolchain without IDE.
Yeah, mspdbsrv.exe would be a hangup. It is a service required to arbitrate access to the program database to allow concurrent compilation. Can't get a service going without getting the registry entries right.
This did not improve in VS2010. It has an entirely new build system, based off MSBuild. There's a ton of stuff that needs to be set just right in the registry. Pretty unlikely to get that right and trouble-free without using the installer. Takes half an hour or so, not worth your time.