Updated Visual Studio, OpenCV Project No Longer Working - c++

I had this working OpenCV project in visual studio 2017. I update Visual Studio to version 15.6.4 yesterday and the project no longer worked. The include files are still there, so are the dlls. The environment settings have not changed.
I tried opening other OpenCV projects that I know also worked for sure before the update and I'm getting the same error so I know my it's most likely not my code.
Here are the errors I'm getting:
I'd really appreciate any help if possible. It was a huge hassle for me getting the environment running the first time and now for this to happen is insanely frustrating, I just really want to start worrying about the actual code instead of all these inconvenient problems that are stopping me dead in my tracks.

After the update, the project was targeted for Windows SDK version 10.0.16299.0 which was not found on my device.
I right clicked on the solution and clicked retarget solution and that fixed the problem.

Related

Visual Studio 2017 (any edition) not longer able to install or update on Windows 10

I have the problem that I cannot update or install Visual Studio anymore on my system.
Today I saw that a newer Visual Studio 2017 version was released and I tried to start the VS installer for the update process. The start for the installer was just spinning but nothing happened. After that I tried to start the installer separately from VS but it didn't work either.
So I continued to make an even bigger mistake by assuming my installed version is bad and to completely reinstall Visual Studio by uninstalling and then trying to start the normal installation process.
Unfortunately it didn't work.
After downloading the webinstaller, it downloads the installer packages it needs but the vs_installer.exe itself will never run successfully afterwards (also if started manually).
There is no error shown directly. It just does not start. The EventViewer is also not showing any errors I would say have a connection to the problem.
Any ideas? Thanks!
After a bit of communication with the Visual Studio team they pointed me to the only thing they know could cause this issue.
Some time ago I added an environment variable to my system named NODE_OPTIONS. It was necessary because the builds of our Angular applications are so big that we had to adjust the available memory size.
Removing the environment variable enabled me to start vs_installer.exe and to reinstall Visual Studio again.
It's a bit obscure and not many people will have this problem. But I hope Microsoft will fix it anyway.
P.S. The silent crash is caused by the usage of Electron for the Visual Studio installer. The person from Microsoft, who helped me to workaround the problem, told me that they are working on a fix.

Microsoft Visual Studio 2017 is failing to repair itself

I'm trynig to install MVS 2017 because my previous version (2015) broke. By broke I mean it was not able to connect to the internet to check my version or something and it did not let me in. Tried googling it, found nothing.
So here I am, trying to intall MVS 2017. So far nothing but failure is being seen.
My first attempt at installing it kind of worked, it even successfuly loaded up, but had no extensions whatsoever (only Visual C++) and was unable to create any projects, the project window just kept reappearing after I finished configuring my project's settings. While installing it for the first time by the way, there were a couple of windows that popped up, they basically couldn't find the installer for Microsoft Visual C++ 2017 and some "Kits" thing.. It was something along the lines of "The feature you are trying to use is on a network resource that is unavailable. Try selecting the installer from some other directory", but I could find it and clicked "Cancel".
After that I tried repairing MVS with the installer. Same two windows appeared, they still can not find their installers apparently, I clicked "Cancel" like in my first installation attempt and the MVS kept repairing itself for about an hour. Then, in my installation window it said "A restart is required. If needed, any remaining setup will resume automatically after the restart".
So I went ahead and restarted my PC and tried launching MVS. Absolutely nothing changed, there are no extensions that I checked when installing.
I tried googling my error messages and other problems and I ended up doing this:
Cleared my C:\ProgramData\Package Cache folder
Installed Microsoft Visual C++ 2017 manually
Changed the installation directory
Nedless to say, on my previous version of MVS I had quite a lot of extensions installed. Including the lastest version of QT, support for Unity, some other C# stuff and a buch of different extensions for C++ development.
Can somebody please give me a website where I can post my logs to or help a little with my situation.
Thank you.
This might be helpful, Please take a look :
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d5e52eb9-98f3-4c4e-9d37-09e20d2b8d4c/failed-install-vs2017-and-link-of-solution-links-back-to-itself?forum=vssetup

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.

Visual Studio 2005 crashes when i open a c++ project or solution

i have quite a large solution with 10 projects (I am new to Visual Studio so be forgiving if I don't get the terminology right). One of the projects is a C++ project that would compile to a .dll. I have a new machine so everything is freshly installed. However, every time I try to open the c++ project VS crashes.
I then tried creating a new c++ solution/project but as soon as it is created and the solution explorer is presented VS crashes. I have searched Stackoverflow and there was something that may have worked but the reference to hot fix KB947315 is not accessible. I have tried to find the hot fix but to no avail.
I tried debugging VS2005 with VS2010 but did not get far.
My OS is windows 7 and I have included a screen shot of the VS help about for the version

MSVCR100D.dll error at runtime

Ok , so i created a program using VC++ 2010. it ran just fine.
Got to work and could only install vc++ 8 due to having a crappy computer that is still stuck on xp sp2...
Everything will link up and build with no errors, But when the program starts to run i get "This application has failed to start because MSVCR100D.dll was not found"
I tried changing the runtime libary from MDd to MTd but still no luck...any idea?
That DLL comes with Visual Studio 2010. If you want to use your program, you'll somehow have to get your hands on it. If possible at your work, you can download it. Another (probably better) option would be to take it with you from home on a USB drive.
Edit: You can also try re-creating the project, and then copying the source code over into the new project. Your newly created project (in Visual Studio 2008) should not be depending on that erroneous DLL.
Edit 2: As Hans Passant added in a comment, this DLL is needed by Debug compilations of your program. So if you simply compile as Release, you can safely ignore the first part of my post. (I hope I'm not breaking gentleman rules by adding this to my post.)
MSVCR100D.dll is for debug mode, and is installed with visual studio 2010, since 2008 has MSVCR80D. You can just google that and download it, and put it in the same direcrory, or just complie in release mode.
here is a download link. You need the small download zip file button, not the big ones.
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
As I know, MSVCR100D is debug version of runtime library used by VC2010。So, if your point either is:
(1) you do not have that dll which you really need, you can download at http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d or
(2) you want to run that program without requirement of MSVCR100/D.dll, you may need to recreate a project in VC8, then substitute with your source files (not solution file or other files managed by Vistual Studio).
FYI: If my memory were not going wrong, I remember that a project created by higher version of VS cannot be opened directly by lower version one. So, how did you build them?