I created application which uses wxWidgets library using visual studio 2008. Now I would like to create version which may be run on other machine.
Because right now when I want to run It on another machine there is an error:
the application failed to start because its side-by-side configuration is incorrect.
What can I do to make It work ?
The Event Viewer should have a record showing what DLL was being searched for, what version of that DLL if found in the SxS cache, and what version it was looking for but couldn't find. You'll then want to (for example) include the correct version of that DLL to be installed with your program. Alternatively, just link to virtually everything statically -- it'll make your executable a lot bigger, but eliminate a lot of problems like this relatively painlessly.
Related
I am trying to simply deploy an OpenGL, C++ application from one computer to another. The app was written using Visual Studio 2017 Community. The first computer has VS installed, the second does not.
The computers have Intel Core i7-8550U CPU and Intel Atom x5-Z8350 CPU, respectively. Both are running Windows 10 Home.
The VS project started as an empty project to which I added everything.
I have copied the release, x64 application .exe file and the one .dll file necessary to the project development to a single directory on the second computer.
Microsoft instructions for local deployment say “Local deployment, in which you copy particular Visual C++ DLLs from your Visual Studio installation—typically in \Program Files (x86)\Microsoft Visual Studio version\VC\Redist\platform\library\—and install them on target computers in the same folder as the application executable. You can use this deployment method to enable installation by users who don't have administrator rights, or for applications that can be run from a network share.”
Nothing I can see or find to set in VS tells me what .dll files are being used by the application I developed and run on the first computer. There is a VS output window that shows a number of .dll files, but those are in c:\windows\system32.
From the reference in the Microsoft instructions regarding the MSVC DLLs in \Program Files (x86)\Microsoft Visual Studio version\VC\Redist\platform\library\, I looked in ..\VC\Redist\MSVC\14.16.27012\x64 on the first computer and found these folders:
I have copied the DLLs from the .CRT directory and the .MFC directory to the second computer to no avail.
When I try to run the application on the second computer it displays the message “Failed to create GLFW window”, which is in the code I wrote as shown here:
It would seem that there must be a straightforward way to do this. I have seen reference to an old Microsoft application (I think), depends.exe, which provides the a list of the DLLs required, but it is no longer deployed with Windows systems.
missing DLL or RTL
causes crash or even no error but just instant closing your app (that is what missing or miss-matching MSVCPP RTL is doing or was at some point).
As the RTL libs are changing all the time (IIRC once in a year) there are a lot of versions already so good luck using MSVCPP apps on fresh OS computers. In order to use some app you usually need to find out which version of RTL it needs which they usually do not report so you will end up with installing all of them you get hands on ...
There is a way around this problem just enable your compiler/linker to link all the stuff it needs directly into exe file instead of using RTL DLLs. However I do not code in MSVCPP and from what I heard MS removed this option from their environment (other compilers I use still have it)
Your error message indicates your App run as should and is not missing anything.
The problem is on GL side. Windows 10 is usually forcing wrong drivers (and not just for gfx cards). The goto case is enforcing (most likely intentionaly) buggy MS drivers (where GL is bugged and DX more or less works) instead of vendor provided. To remedy this (check the driver manufactor and if not what it should be) download&install correct driver from your gfx Vendor site Do not use Windows Driver service for gfx cards !!!
You can use DUMPBIN /DEPENDENTS EXENAME to get a list of bound DLLs. Mind you this only lists DLLs with import table entries, if you're instantiating COM objects this won't help at all.
My guess is you're probably missing the opengl driver/dll on the target system.
ed: actually I'm going to narrow that down to missing the driver, since if you were missing the DLL you'd have gotten an an error on load. The fact you're able to call the function means you bound to it, but that you're only getting failures when it tries to call the driver. Try calling something benign that queries for driver or device info, like a version or string. If that fails you know the driver is missing.
It's my first time using Visual Studio 2017. I built a simple program in C++ on my PC. I was curious to see if my program works on another PC. I tried to execute the .exe on the other computer and it gave me this kind of error:
vs(some letters and numbers).dll is missing.
I assume that the .dll in question is part of Visual Studio.
I tried on a third PC, and this time the cmd stops working and becomes unresponsive after I execute my .exe.
I also have this problem when I compile with MinGW using the g++ compile feature in the cmd. When I execute the program compiled with MinGW on another PC, it gives me the same error, but this time it says something like
gw...dll is missing
Is there a way to avoid this error without installing the Visual Studio (or MinGW at this point) on any other PC I want my program to run on?
If you're interested in the code, I can put it here, but I don't think it's the problem here because I have the same issue for every other .exe compiled on my PC.
Here's a picture of the error:
In case of Visual Studio, you need to install Visual C++ Redistributable libraries or provide the libraries that are required by your application with .exe file (I am not sure if it violates license or not though).
In case of MinGW, you need to provide required DLL as well. I guess that you need libgcc_s_dw2-1.dll and libstdc++-6.dll, but you would better check it yourself. And remember about the license.
You may use Dependency Walker to analyse dependencies of your application.
UPDATE (2017-12-12):
I've missed the time you posted the screenshot. As far as I see from it the problem is that you are trying to run debug version of your executable: ucrtbased.dll is the debug version of the ucrtbase library and is only available (from what I know) from Visual Studio distribution. If you want to run your application on the computers that do not have installed Visual Studio, then you should use the Release version of your application.
In order to understand your problem you need to understand the concept of DLL.
Dynamic-link library(DLL) - As described by Microsoft:
A DLL is a library that contains code and data that can be used by
more than one program at the same time. For example, in Windows
operating systems, the Comdlg32 DLL performs common dialog box related
functions. Therefore, each program can use the functionality that is
contained in this DLL to implement an Open dialog box. This helps
promote code reuse and efficient memory usage.
So to put it simply, DLL is basically a bunch of compiled code, which is being linked to your code at load (or even run-time). Now, of course if your system is missing the DLL, your progrem will fail to work. To make things even worse, DLL are sensitive to the compiler that was used. So each DLL might have multiple version, so you will need to right DLL.
Now to the problem itself, the error message are the best way to start. They guide you what DLL are missing, and what is their name. For instance in your case "vs*.dll" is most likely related to Visual C++ runtime redistributable.
Finally, please note you have another consideration to make in addition to make your own system work: Every one that will use your code might face the exact same problem. So if you actually intend to share your .EXE with other people, you will need to understand how to guide them, or even automate their installation process.
i'm trying to create an installer for my opencv project. The Projects runs just fine, no error while compiling or at runtime.
And i need the program to run on other machines as well, so i thought of making an installer. I've read that MS VS 2013 has discontinued the Deployment tool and so i am using InstallShied Limited.
I'm setting everything according to their tutorial and i am adding the opencv libs, it builds and i can install my application. But as soon as install it on other machine i get the following errer message:
The procedure entry point _except1 could not be located in the dynamic link library opencv_imgproc.dll
I also get this error if i just copy the dll files to another machine along with the exe file. Does this mean, that the dlls are not compatible with the system? i am using windows 8.1 on both machines. and its also weird that it runs when i build it from VS.
Any advice is greatly appreciated.
regards,
hh
Solution: i had the 64bit dlls included and runnning on 32bit. The 32 Bit dlls are in vc10
I tried making an executable file of my program but there are some errors which I did not understand or could not find solutions of. I used my .exe file onto another computer and there was an error. I made my program through QtCreator (v 5.1.1)with my Windows 7, 64-bit laptop. There was an error when I used it in 2 32-bit laptops.
The error message says:
This application failed to start because it could not find or load the Qt platform plugin "windows".
Available platform plugins are: minimal, offscreen, windows.
Reinstalling the application may fix the problem.
I already created a new folder called "platforms" containing "qminimal.dll", "qoffscreen.dll" and "qwindows.dll" in the same level of my .exe file. I also pasted in the same level the other DLLs that my program needs.
In Qt 5.2, there is a tool that can be used for deployment on Windows: windeployqt. It will be in the bin folder of your Qt installation. It greatly simplifies deployment, so if you don't mind downloading a newer Qt version, I'd highly recommend it. It may even work with an older Qt version, but I haven't tested it.
We had exact same problem with Qt5.3.
Problem arised when we've rebuilt the Qt to reduce dependencies (e.g. Qt5Positioning, Qt5Sensors).
Created dlls were copied to different directory (source for installation), but we forgot to copy also newly created platforms plugin dlls.
The problem was fixed by using all dlls from same Qt build (with same configuration).
Your problem is probably the same: mixing dlls from different Qt builds (e.g. different configuration, version,...).
I have a simple application which reads a few text files does some calculations and writes a few text files. Works perfect on my development machine (Server2008R2 VC++ 2010). I can't get it to run on a Win7 machine even thought I have installed/run the vs2010 redistribute x86.
The first error I got was missing mfc100ud.dll (yes, I'm using debug, if I try the release it just crashes, as debug tells you what's wrong). I put mfc100ud.dll in the application's directory, now fgets asserts as shown below. str is not null and the file did open successfully.
What have I missed?
My goal here is to just run the MFC app on the Win7 machine without have to install vs2010.
Another consideration, the only reason I am using MFC is for the COleTimeDate functionality. I've looked for alternatives but haven' found anything workable or as simple to use.
Thanks.
Assertion Error
This error occures if the file stream pointer (provided by fopen) is NULL.
Is it possible that you don't have any error checking after you used fopen?
Basically use "static linking" to the MFC and CRT. Than there is no Need to install and copy any runtime files.
Redistributable assemblies are only available for release builds. If you really want to distribute a debug build, you have two options:
link your app statically, so you don't need any shared DLL (such as mfc100ud.dll)
distribute together with your app (in your app folder) all the dependent DLLs. you can check the dependencies with depends.exe