Reinstall of Visual Studio 2010 Professional does not install C++ headers and libraries - c++

I have a Windows7 x64 machine (german). I had VS2008Prof, VS2010Prof and VS11 DP installed. I work mainly with VS2010. I was experimenting with the latest Qt version and tried to get html5 video running with QtWebKit. I installed some codecs and then also the Windows SDK 7.1.
Suddenly the VS2010 debugger began to behave strange: it showed local (stack) variables correctly, but heap variables (including the this pointer) showed wrong values when stepping through some method. And I am sure that this was not the fault of my code.
I then tried to revert my changes and ended up uninstalling the Win SDK 7.1, the VS11 DP and VS2010, the latter several times with the standard uninstall and with VS2010_Uninstall-RTM.ENU.exe. After each uninstall I tried to reinstall VS2010: It reported a successfull install (including C++) but in the Program Files (x86)\Microsoft Visual Studio 10.0\VC\include folder there are only the three files ammintrin.h, srv.h and wmiatlprov.h. The lib folder only contains the amd64 and ia64 folders and no C++ or msvc100* libraries.
Any ideas or suggestions?
(I also posted this on social.msdn.microsoft.com)

I resolved this issue by re-installing the complete system. Perhaps VS2010_Uninstall-RTM.ENU.exe /full /netfx may have helped, but I overlooked the /full switch.

Related

Problems installng/uninstalling 'Visual Studio Community 2013 with Update 5'

I've been having problems installing/uninstalling visual studio, the first time, I successfully installed it, but then I realised I had no use for it and needed the older version. I tried uninstalling it, but the loading bar wasn't moving after 10 mins, so I deleted the files from \Program Files (x86)\ instead.
So I went on and installed visual c++ 2010 express. But the next day,(after failing at everything) I found I did in fact need VS community 2013, so I downloaded the installer and it failed to install a couple things that didn't matter, but when I tried to find where VS installed, there were only the extra bundle programs, and not VS, so I figured I'd have to fully uninstall it.
I've tried uninsalling it, but it failed.
I've tried force uninstalling it, but all that did was try to reinstall it.
At the moment I'm do the sfc /scannow command
Info About my PC:
OS: Windows 10 Home
System Type: 64-bit OS, x64-based processor
Here's a log from when I tried to repair (or reinstall it, I can't remember) it:
http://pastebin.com/AbknK9PL
I found out how to do it.
Intsall VS 2013
uninstall it
reboot
delete VS from program files
install VS 2013

How can I get MatLab to find the Visual C++ Compiler?

Preamble: I found a solution in the midst of writing this, and this problem was a PITA and had a convoluted solution. Thus, I feel compelled leave this here to help any poor soul who has this problem.
I'm new to MatLab, and I don't usually use Visual C++ either, so forgive me if this should be painfully obvious.
Short version: I have Visual C++ 2013 installed on my computer, but mex can't find it when I run mex -setup c++. I get the following:
>>mex -setup cxx
Error using mex
No supported compiler or SDK was found. You can install the freely available
MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler. For more options, see
http://www.mathworks.com/support/compilers/R2015b/win64.html.
Here's the full situation.
OS: Windows 10 Home
Compiler: Visual Studio 2013 (v120, up-to-date)
I confirmed that I can compile and run a program using this toolset.
MatLab version: 2015b
I was originally running Visual Studio 2015, and mex found the compiler just fine. However, I soon found out that Simulink is not compatible with VS 2015, so I had to roll back to VS 2013, and this is when my problem started.
I've tried, among many others, the following sites to find a solution:
The MatLab mex documentation - No help, only shows basic mex usage.
The MatLab supported compiler list - Confirmed that VC++ 2013 is compatable.
Then I went down a rabbit hole.
A very protracted mathworks.com answer that suggested other links. This led me to...
Another mathworks.com answer which sounds like my problem, and suggests patching my setup. Turns out that I don't have SDK 7.1 installed. So, I went to install, and got this error:
Some components could not be installed. Some Windows SDK components require the RTM .NET Framework 4...
This Stack Overflow question asks about this issue, and I hit the exact same issue Danilo Gadêlha had in regards to the .NET Framework already being installed.
I tried the top answer, and after removing every single reference to .NET framework of any version I could find, including those under "Windows Features", I still couldn't install.
I tried the next option, and even in safe mode, RegEdit wouldn't let me change the values suggested by the next answer, so that was a bust.
Lastly, I tried MandM's solution, which finally solved my chain of problems.
I think this was the root of my problem: when I uninstalled Visual Studio 2015 and installed Visual Studio 2013, an installation or registry setting was left in an incorrect state, and mex was unable to find Visual Studio 2013 as a result.
The solution that worked for me:
Leave Visual Studio 2013 installed.
As MandM answered:
Uninstall the following:
"Microsoft Visual C++ 2010 x64 Redistributable"
"Microsoft Visual C++ 2010 x86 Redistributable"
Before installing the Windows 7.1 SDK, and the install package reinstalls those two during installation.
As Robert Važan points out in the comments:
If error message persists despite this workaround, just click OK and proceed with installation. The installation will succeed this time..
I did get this error, but the install worked fine.
Install the SDK 7.1 Patch, which fixes the issue highlighted on this mathworks.com answer.

GCC suddenly stopped working? Missing dependencies? [duplicate]

I have a problem with our executable. I'm running this C++ 32-bit executable on my Windows 7 64-bit development box that also has all those Microsoft applications (Visual Studio 2008 + 2010, TFS, SDK, Microsoft Office)...
And it's still running just fine.
Now I got the client installation of the very same program and was asked to test it with a clean Windows 7 installation. Thus I got one Windows 7 64-bit VMware and updated it to Windows 7 SP 1 (the very same version my developer box is tuning).
But while on my developer box everything is fine the program does not work with the VMware (30 days trial) box.
The x86 Dependency Walker is telling me that the following DLL files are missing:
API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL
I googled for those API-MS-WIN-... DLL files and found they should actually already be part of Windows 7 (some sites claiming the belong to Windows 8 and Windows Server 2012 though).
I already tried the suggested fixes I found, which are:
running 'sfc /scannow'
installing Visual Studio 2008 SP1 runtime executables
But that didn't solve anything. :-(
Side note: My development box does not have them either, and does not seem to need them. For example, the user32.dll on my box does not link against one of those, while the installation on the VMware does.
Any idea on how to fix this issue?
I tried to find a suitable download / fix on the Microsoft pages, but I failed.
After solving my issue I wanted to report what I found out, and I can't post this as an answer because the question has been closed.
Actually all the DLL files reported missing by the Dependency Walker tool, namely those
* API-MS-WIN-CORE-...
type DLL files were not part of the actual problem.
In my case the registration of three OCX files was missing and after that everything was just fine, BUT Dependency Walker tool still listed all the very same DLL files as before even when the program was just running fine now.
The gist of it: As someone elsewhere stated, the tool is a bit dated by now and does not always work properly with a newer OS. Thus keep an eye open and don't get mislead by missing 'API-MS-WIN-CORE-COM-L1-1-0.DLL', ... the problem probably lies entirely elsewhere.
This problem is related to missing the Visual Studio "redistributable package." It is not obvious which one is missing based on the dependency walk, but I would try the one that corresponds with your compiler version first and see if things run properly:
Visual Studio 2015
Visual Studio 2013
Visual Studio 2010
Visual Studio 2008
I ran into this problem because I am using the Visual Studio compilers, but not the full Visual Studio environment.
Going to dare to inject a new link here: The latest supported Visual C++ downloads. Stein Åsmul, 29.11.2018.
I just resolved the same problem with C++ Qt 5 and Windows 7 64 bits with MSCVC 2012.
In the beginning I thought it was a MSVC/Windows DLL file problem, but as BorisP said, the problem was in my project dependencies. The key is "How to know your project dependencies in Qt 5?".
As I didn't find any clear way to know it (Dependency Walker didn't help me a lot...), I followed next the "inverse procedure" that takes no more than 5 minutes and avoid a lot of headaches with DLL file dependencies:
Compile your project and take the executable file to an empty folder: myproject.exe
Try to execute it, It will retrieve an error (missing DLL files...).
Now, copy all the DLL files from Qt (in my case they were in C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin) to this folder.
Try to execute again, it will probably works fine.
Start to delete progressively and try every time your executable still works, trying to leave the minimum necessary DLL files.
When you have all the DLL files in the same folder it is easier to find which of them are not valid (XML, WebKit, ... whatever..), and consequently this method doesn't take more than five minutes.
I just resolved the same problem.
Dependency Walker is misleading in this case and caused me to lose time. So, the list of "missing" DLL files from the first post is not helpful, and you can probably ignore it.
The solution is to find which references your project is calling and check if they are really installed on the server.
#Ben Brammer, it is not important which three .ocx files are missing, because they are missing only for Leo T Abraham's project. Your project probably calls other DLL files.
In my case, it was not three .ocx files, but missing MySQL connector DLL file. After installing of MySQL Connector for .NET on server, the problem disappeared.
So, in short, the solution is: check if all your project references are there.
As mentioned, DCOMP is part of the VC++ redistributables (implementing the OpenMP runtime) and is the only truly missing component. All the rest are false reports.
Specifically API-MS-WIN-XXXX.DLL are API-sets - essentially, an extra level of call indirection introduced gradually since Windows 7. Dependency Walker development seemingly halted long before that, and it can't handle API sets properly.
So there is nothing to worry about there. You're not missing anything more.
A better alternative to find the truly needed DLL files that are missing (if that is indeed the problem) is to run Process Monitor and step backwards from the failure, searching for sequences of failed probes for a specific DLL file in all the system path.
I also ran into this problem, but the solution that seems to be a common thread here, and I saw elsewhere on the web, is "[re]install the redistributable package". However, for me that does not work, as the problem arose when running the installer for our product (which installs the redistributable package) to test our shiny new Visual Studio 2015 builds.
The issue came up because the DLL files listed are not located in the Visual Studio install path (for example, C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist) and thus had not been added to the install. These api-ms-win-* dlls get installed to a Windows 10 SDK install path as part of the Visual Studio 2015 install (e.g. C:\Program Files (x86)\Windows Kits\10\Redist).
Installing on Windows 10 worked fine, but installing on Windows 7 required adding these DLL files to our product install. For more information, see Update for Universal C Runtime in Windows which describes the addition of these dependencies caused by Visual Studio 2015 and provides downloads for various Windows platforms; also see Introducing the Universal CRT which describes the redesign of the CRT libraries. Of particular interest is item 6 under the section titled Distributing Software that uses the Universal CRT:
Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLL files are necessary is different on different versions of Windows, so you must include all of the DLL files in order for your program to run on all supported versions of Windows).
This contribution does not really answer the initial question, but taking into account the hit-rate of this thread I assume that there are quite a few people dealing with the problem that API-MS-WIN-CORE- libraries cannot be found.
I was able to solve a problem where my application refused to start with the error message that API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL is not found by simply updating Visual Studio.
I don't think that my build environment (Windows 7 Pro SP1, Visual Studio Ultimate 2012) was messed up completely, it worked fine for most of my projects. But under some very specific circumstances I got the error message (see below).
After updating Visual Studio 11 from the initial CD-Version (I forgot to look up the version number) to version 11.0.61030.00 Update 4 also the broken project was running again.
This solved the issue for me:
Uninstall the Visual Studio 2010 redistributable package if you have it installed already, and then install Microsoft Windows 7 SDK.
I solved the problem. When I registered the OCX files, I ran it with the Command Window that had been executed as an administrator.
For anybody who came here, but with a Photoshop problem: my solution was to uninstall the MS VC++ redistributable first x86 and 64 both. Then install one appropriate to the Windows version and architecture (86 or 64).
Installation of SQL Server Management Studio 2014 on a freshly installed Windows 7 resolved this problem at our client after a two-day ridiculous battle.
I came here with this problem occurring, after trying a fresh Windows 7 OEM install, upgrading to Windows 10.
After some searching of Microsoft forums and such I found the following solution which worked for me:
Replace C:\Windows10Upgrade\wimgapi.dll with the one from C:\Windows\System32\wimgapi.dll
I suggest also checking how much memory is currently being used.
It turns out that the inability to find these DLL files was the first symptom exhibited when trying to run a program (either run or debug) in Visual Studio.
After over a half hour with much head scratching, searching the web, running Process Monitor, and Task Manager, and depends, a completely different program that had been running since the beginning of time reported that "memory is low; try stopping some programs" or some such. After killing Firefox, Thunderbird, Process Monitor, and depends, everything worked again.
I had the same problem. After spending hours searching on the web, I found a solution for me.
I copied the file combase.dll file (C:\Windows\System32) to the release folder, and it resolved the problem.
Just to confirm answers here, my resolution was to copy the DLL that was not loading AND the ocx file that accompanied it to the system32 folder, that resolved my issue.

kernel32.lib accidentally deleted - VS 2012 Fix

I recently installed VS2012 on my home laptop to write some software for fun in my spare time. Here's the order in which the mishap happened:
Accidentally installed VS2012 for Windows 8 Apps. Realized that I actually wanted the Windows Desktop version.
Uninstall the above, install VS2012 for Windows Desktop.
Start writing software, everything is fine and compiles.
See random VS Folder that mentions Windows 8 on my start screen - permanently delete it from computer thinking it was related to #1.
My program no longer compiles, with the following common error:
error LNK1104: cannot open file 'kernel32.lib'
I searched my C-Drive to find the location of this file to try and diagnose the problem, except that it doesn't exist - I can't find it anywhere. I tried a fresh VS2012 install, and that was a bust - the same problem. I also tried to download the VS2012 SDK, but it won't install, insisting the VS2012 isn't installed, and that it's required.
What can I do!?
EDIT: I've tried to repair the install twice as well.
You need to (re-)install the Windows SDK. That includes everything you need to develop Windows apps, including the lib files for linking to system DLLs. You'll find the Windows 8 version for download here.
I have no idea why re-installing Visual Studio didn't work for you. It should include the Windows SDK, but maybe you're installing the wrong version. Not sure if Express versions include it, for example.
Note that the Windows SDK is not the same thing as the Visual Studio SDK. The SDK part means "Software Development Kit", so they're similar. But one is for developing software for Windows, while the other is for developing software for Visual Studio (like add-ins and extensions and whatnot). The Visual Studio SDK is not going to include lib files for system DLLs, though, so that's why it didn't work. And naturally it requires Visual Studio to be installed first.
After multiple re-installs, repairs, and SDK reinstalls, the only thing that worked was a full system restore.

Compile hunspell with Visual Studio

I need a spellcheck tool for my MS C++ (MFC) project. It looks like hunspell is a good choice. However, I found it difficult to compile with visual studio. Can someone help?
Here is what I have done:
I downloaded hunspell from sourceforge, the version is 1.2.14. Unzipped it.
Created an empty solution in visual studio and added the projects into it. The project files are under win_api directory.
Then I tried to compile it, and got a bunch of errors.
By the way, my operating system Vista (x64).
Please help.
Thanks for the reply.
Today, I tried it on a Windows XP (x86) system and it compiled without errors.
The error message with Vista x64 was: error c2552: non-aggregates cannot be initialized with initializer list. It is for file 'utf_info.cxx'. It's strange that XP x86 works fine.
It seems the version 1.2.12 works fine, for both 32 and 64-bit machines.
This appears to be a known bug.
There's now a patch available, which has been integrated into the CVS as of January 13, 2011. Make sure that you grab the latest copy of the source.