I created a Qt program then released it and solved all Qt dependencies using windeployqt.exe. On PCs supporting visual studio the program works fine, but on other PCs the program gives an error saying it needs some visual studio libraries like MSVCP140D.dll can anyone help me on this please?
Yes. MS Visual Studio DLL should be on the PC you run it.
In addition, the archive must contain the following compiler specific
libraries (assuming Visual Studio 14.0 (2015) or 15.0 (2017) or 16.0
(2019)):
Component -> File Name
The C run-time -> vccorlib140.dll, vcruntime140.dll
The C++ run-time -> msvcp140.dll
source
Related
Building an application using the CEFSharp browser, works fine on my machine, but crashes on the server with the following error:
System.IO.FileLoadException: A procedure imported by 'CefSharp.Core.dll' could not be loaded.
I’ve seen this problem all over the internet, and the most common solution seems to be installing the VC++ Redistributable. However, I don’t have that access on our production server. In the development server, I tried installing the redistrituable (x86, x64, 2017, and 2013) and nothing made a difference. The computers are 64 bit, but the application is 32bit so I tried everything.
Can someone tell me what files specifically I need to add to the application directory to make CEFSharp work. Section 6 of this document: https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio-c-2012-redistributables-on-the-target-app lists directories of files necessary, but I’m using Visual Studio 2017 and don’t have any of these directories on my machine.
Additional Info:
Development machine Windows 10, server 2016 Standard
Build set to x86, have not made any config changes for Any CPU mode
Windows Forms application
CefSharp version 71.0.0 from NuGet (& individually through Package Management Console Simple CefSharp application is missing files at runtime)
Not using any type of package or ClickOnce Deployment, manually
uploading all files from my computer to server
Update:
Although I'm still unable to get CEFSharp to work in my project, I accepted Peter Liapin's answer because it did answer the question I asked. Now I know what files in the VC++ Redistributable to copy to my application folder on the server, I just don't have the specific dlls he mentioned on my computer or on the server.
Additionally, I created a new test Windows forms project with CEFSharp and it worked on the server without the VC++ Redistributable dlls. However, I need the CEFSharp browser to work in a user control referenced by existing application.
The Visual C++ dlls you need to ship with your CefSharp based project:
If you use CefSharp v63.0.3 or below:
msvcp120.dll
msvcr120.dll
If you use CefSharp v65.0.0 or above:
#Example of files for VC++ 2017(141), there will be a few less files for VC++2015(140) and a few more for VC++ 2019(142), copy everything from the `Microsoft.VC14x.CRT` folder where `x` matches the VC++ Version
concrt140.dll
msvcp140.dll
msvcp140_1.dll
msvcp140_2.dll
vccorlib140.dll
vcruntime140.dll
Files can be found on your Dev PC in the:
C:\Windows\System32
C:\Program Files (x86)\Microsoft Visual Studio\[Version]\[Edition]\VC\Redist\MSVC\[Version]\[x64|x86]\Microsoft.VC14x.CRT folder.
See section at bottom if you are having problems finding the files on your machine, they are in slightly different folder structure for VS2015 compared to VS2017/2019
Note, you must have an appropriate version of Visual C++ or Visual Studio installed on your PC, otherwise you would not be able to find them:
Version 120 is installed with C++ Redistributable for Visual Studio
2013
Version 140 is installed with Visual C++ Redistributable for Visual
Studio
2015
Version 141 is installed with Microsoft Visual C++ Redistributable
for Visual Studio
2017
Universal CRT is required by Visual C++, on Windows 10 it is installed by default. Local deployment of the Universal CRT is supported see https://learn.microsoft.com/en-us/cpp/windows/universal-crt-deployment?view=vs-2019#local-deployment
For Windows 7/8/8.1 you will either need the Universal CRT pre installed or deploy the files as per the link above.
To deploy redistributable Visual C++ files, you can use the Visual C++
Redistributable Packages (VCRedist_x86.exe, VCRedist_x64.exe, or
VCRedist_arm.exe) that are included in Visual Studio. In Visual Studio
2017, these files can be found in the Program Files[ (x86)]\Microsoft
Visual Studio\2017\edition\VC\Redist\MSVC\lib-version folder, where
edition is the Visual Studio edition installed, and lib-version is the
version of the libraries to redistribute. In Visual Studio 2015, these
files can be found under your Visual Studio installation directory in
Program Files [(x86)]\Microsoft Visual Studio
version\VC\redist\locale. Another option is to use redistributable
merge modules (.msm files), which in Visual Studio 2017 can be found
in the Program Files [(x86)]\Microsoft Visual
Studio\2017\edition\VC\Redist\MSVC\lib-version\MergeModules\ folder.
In Visual Studio 2015 these can be found in Program Files
[(x86)]\Common Files\Merge Modules. It's also possible to directly
install redistributable Visual C++ DLLs in the application local
folder, which is the folder that contains your executable application
file. For servicing reasons, we do not recommend that you use this
installation location.
As per https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=vs-2019 the locations for VS2015 are slightly different to VS2017/2019.
I had what appears to be the exact same issue, and I was able to get things working by copying msvcp140.dll and vcruntime140.dll into the bin folder of my application. I'm using CEFSharp 75.1.143 with cef.redist.x86 75.1.14.
Seems that Microsoft offers a unified installer for all C++ runtimes versions, from the 2015 to 2022.The installer is available on both 32 or 64bit, depending your architecture.
For details, check the Microsoft Visual C++ Redistributable latest supported downloads article.
I am trying to install Qt5.1.1 and have already installed VStudio 2010 Pro, but I stll get the error saying Qt needs a compiler set up to build.
I looked it up, and I only find very complex solutions that are impossible for me to implement.
Can anyone give me specific directions on how I can get Qt5.1.1 working in my laptop?
Btw in case you couldn't tell, I'm a newbie.
Thanks
First, ensure that your Visual Studio installation contains a 32-bit compiler (the official Visual Studio 2010 packages only support 32-bit compilers)
Then, ensure that you've downloaded and installed one of the packages that are marked "Qt 5.1.1 for Windows 32-bit (VS 2010)" from http://qt-project.org/downloads
If Qt Creator still doesn't auto-detect your compiler, add it manually: http://qt-project.org/doc/qtcreator-2.8/creator-tool-chains.html
If you had to add your compiler manually, also add a Kit to combine your compiler with your Qt libraries: http://qt-project.org/doc/qtcreator-2.8/creator-targets.html
I'm developing on a Winodws 7 x86 machine in Visual Studio 2012 using .NET 4.5. I installed the x86/x64 System.Data.SQLite official Nuget package for my project. But I still don't see it as an option in the Data Source\Data Provider selections in the "Choose data source" dialog. I saw this answer here and it looks like this is all I should have to do (SQLite 1.0.82.0 (latest) in Visual Studio 2012 not showing in Designer Data Source). Am I missing something?
Thanks!
This package worked for me.
Apparently
"This setup package is capable of installing the design-time
components for Visual Studio 2012."
means
"This setup package is required for installing the design-time
components for Visual Studio 2012."
I just wanted to add this as a followup because I was having issues seeing the designer in VS2012 as well and it may help others in the future.
After multiple attempts at installing the designer and not seeing it show up, I ran
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe /setup
This will force VS to rebuild its registry based on all of the installed packages. This will take a couple of minutes. Afterwards, I was able to start up VS 2012 and see the entry.
I am curious whether the installer executes this command at all or if it just triggers it but does not wait for it to finish. At which point the end user opens VS 2012 before the command has time to finish.
I am using the Visual C++ 2010 compiler. How can Qt be compiled in Visual C++?
The current version of Qt (4.6) doesn't support Visual Studio 2010:
http://doc.qt.nokia.com/4.6/supported-platforms.html
However as you can see on that link, Qt 4.7 does plan to support it.
Can you use Visual Studio 2008 instead? I have been using it with the Qt plugin. You might need the full version of VS 2008 though - I don't think you can install the Qt plugin in the Express version.
If the full version of Visual Studio 2008 isn't an option, you might be better off using Eclipse with Qt integration, or QtCreator (available from the Qt website.) If you are planning on compiling your Qt project on other platforms, one of these would probably be a better choice in any case, since the Visual Studio project format doesn't translate to other platforms (to my knowledge.)
if you want, I can send you a detailed description of the installation and compile procedure with Visual Studio 2008
I am using both Qt Framework and QuickFIX engine to create a financial application with GUI.
My problem is that when I compile a program that implements QickFIX engine and Qt Framework, it gives me a compilation error: it doesn't find some header files in MinGW (socket.h, inet/in.h, etc)
I am on Windows 7 and I know that to use sockets you must use winsock.h and so on, but the problem is I have Visual C++ express edition and it's not supported by Qt, so I used Qt Creator and since I have an open source of Qt, QuickFIX engine uses the header files of Linux (socket.h, etc) rather than windows. So it gave me an error.
Please can you suggest me a solution?
I use Visual Studio Express 2010 with Qt. You will need to build Qt with it. When you configure make sure to specify Visual Studio 2010 as the make spec.Last time I built it got hung up on a couple of projects. To get around this you need to clear out some temporary files that Nokia packaged in the installer for some reason. Just google the error for details.
Once you have Qt built you ought to be able to qmake -tp vc your project and then load up the generated Visual Studio project file.