C++ Chat client missing lib file - c++

I have made a chat program with using Winsock2.h and the lib file ws2_32.lib.
When I want to test the chat program out on a computer on another network, it shows me a message box with the text:
"The program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem".
How do I make my program able to run on all windows 7 machines without having to install Visual Studio?

you should create a setup project which includes the required libraries and installs them in the client machine during your application's setup.
In fact you need a setup anyway if you want to create a shortcut to your program in the Start Menu or on the desktop for example.

You need the redistributable package for your visual studio version. For VS2010 (x86) can be found here:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5555
Alternatively, you can create an installer that will include the dlls.

Your program depends on the Visual C++ redistributal. You will need to bundle it with your programs installer.

You do not have to install Visual Studio, You do need to make sure all of your program's dependencys are on the destination computer. You would normally do this by creating a setup program. The dll that you are missing MSVCR100.dll can be found as part of the VC++ redistributable package

Related

C++ executable, vcredist errors?

I have created a simple C++ Opengl application in Visual Studio 2019 and some of my users have reported getting a vcredist related error at program start. The application folder contains just the .exe and some .dll's for libraries. Do I really need to send users the 2019 x64 vcredist .exe for them to install? is there no way to embed this into the application? How do projects like Godot do this?
You can include vcredist.exe in your program. Games usually try and do this if they have there own launcher which can run and install the appropriate DLLs for this user in the background. If you have a smaller scale program you can just make a installer which checks if the user has the appropriate DLLs installed and if they don't it installs them for the user.
Determining Which DLLs to Redistribute
Understanding the Dependencies of a Visual C++ Application

Copy MFC Library to project

I am new to C++, and I have made a program on visual studio 2010. I then made an installer for it using Inno Setup. When I install it on my computer it runs fine, but when I move it to another computer and install it, an error appears like "mfc100ud.dll" is missing from your computer".
My question is: If I just copy the MFC files into my visual studio project directory, make another installer for it and run it on another computer; will the program work? Or do I have to do something else? Any help would be appreciated.
That 'd' in mfc100ud means you have linked to the debug version of MFC. The debug dll is only available with Visual C++ installed. You need to build a release version of your program. And you need to include the VC redistributable package in your installer, or change the runtime and MFC libraries to statically link into your program.

missing DLL file when i run my application on another machine?

I am using visual studio 2013 with ISLE 2013 to create a windows form application,
it is the first time i use this style,
I successfully built the application but the problem comes after i setup the application on another PC is says msvcp120.dll is missing!
I have searched the web for this problem and I could not find anything?
any ideas?
I am not a windows guy but I will try to answer, as I did some small research. I found information here. It says:
"This file is the dynamic linking library designed as a Microsoft C Runtime Library, usually comming with Microsoft® Visual Studio®. It is a collection of link libraries that contains instructions for the standard C library functions. It is used by almost all Windows programs compiled from C or C++ source code. This library is used for the applications written under Visual Studio."
So, I am guessing it is a microsoft thing. A runtime library that is required to run c/c++ projects built with visual studios. Download the .dll from a source online (just google) and include it into your project directory. If it helps, include that file in your installation file.
Until anybody who is working with windows and has any idea about that dll answers you question, this answer can help you to get started.
found the solution I should add the Visual C++ runtime library installer
Don't download single DLL's from which you know hardly anything from random sites.
From your Visual Studio 2013 installation directory, check C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033 and you'll see vcredist_x64.exe and vcredist_x86.exe files that need to be run on your target system.
Use the x64 variant for 64 bit apps. It will install MSVCP120.dll for one, and some other DLL's as well.
Msvcp120.dll is the dll for standard c++ library. When you develop an application using standard c++ in VS 2013, the application defaults to Msvcp120.dll(Msvcp110.dll in VS2012). The client computer should install Visual c++ 2013 Redistributable.
Some dependencies that are on your system because you have Visual Studio installed will not be on the target system. You will need to include them in your installer or install a redistributable package on the target machine.
As there are many options and listing them all here would be too much and also redundant, you may want to visit the Microsoft site for this task and read up on all those options before you decide which you chose.
You can download the .dll file from DLL Store and paste that file into the directory where you have installed the setup.
Hope it will help you.

Deploying a c++ QT5 app

I am trying to deploy my application. It works on Windows 7 with quit a lot of .dll files but I can't get it work on Windows XP. It seems that windows Xp requires more dll files. But the Dependency walker tool keeps showing me new dll files missing. Now it says API-MS-WIN-CORE-PROCESSTHREADS-L1-1-0.DLL and API-MS-WIN-SECURITY-BASE-L1-1-0.DLL are missing.
When i try to start the exe nothing happens ... no error...
I use Qt5.0.2 with pre build msvc2010.
Thanks in advance
Perhaps this is related to missing VS 2010 redistributable? Also make sure to build in a release-configuration if you don't already know.
http://www.microsoft.com/en-us/download/details.aspx?id=5555
If you package this up into an installer like NSIS, I'd typically execute it with the argument /Q to prevent any GUIs from popping up... it won't ask for any admin privileges which is nice since the previous VC 2008 redistrib always required it.
As the previous answer a requirement is the VS redistributable. In your case, as you use VS2010 the file to download is MS 2010 redistributable.
Besides of that there is the executable windeployqt that helps with the deployment package copying the Qt DLLs required on your executable directory.

Running .exe crashes while running from vs2010 is successful

I've developed a c++ program using Visual Studio 2010 and it works perfectly, but while trying to start it with the .exe file created in the debug folder instead of inside the VS2010, it crashes. It updates my DB once, but then it crashes unexpectly..
Does anyone know why? What should I do to avoid it in order to be able to run my application in another PC. It uses the winsock library and mysql API for C, so I'm wondering if I need to configure something else that the VS2010 doesn't do by its own while linking or so.
Did you depend on the current directory? We had a case once that turned up where that was the problem.
You should set the build configuration to Release, and use the .exe from the Release folder, once you rebuild the application. The executable from the Debug folder is (in principle) only used by Visual Studio internally, and it would therefore make no sense to redistribute it.
Note however, that in order to run any application created with visual C++, the user must install the visual C++ redistributable package, so make sure that the user has got that installed.