Using visual c++ tools for windows desktop with installer - c++

I used these tools to allow me to build a C++ project that was part of an expert system tutorial (CLIPSCLRWrapper), and that worked fine. My question is how do I include the dependencies in an installation of my final executable so that it can be installed on a clean system, without Visual Studio?
I'm using the above wrapper DLL in a C# Windows forms application, then making an installer for the resulting executable, but it seems to be missing some dependencies when I install on another PC without Visual Studio. How can I discover which dependencies are missing that are provided by the tools for windows desktop, and how do I add them to my installer?

Dependencies can be added to the installer, by adding them to "Application Folder". First, open "File System" of the installer, then you will find sub folders one of them called "Application Folder". Inside the "Application Folder", you could put all the application dependencies.
Good luck

Related

Using libzip library from Visual Studio 2017 and cmake

I have a c++ program that was originally written in Linux. The program uses functions from the library libzip:
https://libzip.org
I am now working on a windows-based platform in Visual Studio 2017. Everthing works, as I could basically use the same cmake-files as I used on the Linux-platform. However, in Linux I used the package manager to install libzip. I do not have that option in Windows. I somehow need to build a Windows-version for libzip and include the files (header files and lib files) in my CMakeLists.txt file. Can someone help me with a step-by-step guide for this?
Take a look at vcpkg. It is a package manger for the Windows platform. It builds and installs many open source libraries for Windows. libzip is mentioned specifically as one of the ports.
Is it possible for you to use the Nuget Package Manager within Visual Studio?
right click on your solution
select "Manage packages for your solution"
search for libzip
select lipzip and click install
you should now be able to #include "zip.h"

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.

C++ Chat client missing lib file

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

Different versions of C++ libraries

After compiling a simple C++ project using Visual Studio 2008 on vista, everything runs fine on the original vista machine and other vista computers. However, moving it over to an XP box results in an error message: "The application failed to start because the application configuration is incorrect".
What do I have to do so my compiled EXE works on XP and Vista? I had this same problem a few months ago, and just fiddling with some settings on the project fixed it, but I don't remember which ones I changed.
You need to install the Visual Studios 2008 runtime on the target computer:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
Alternatively, you could also link the run time statically, in the project properties window go to:
c++ -> Code Generation -> Runtime
Library and select "multi-threaded
/MT"
You need to install the runtime redistributable files onto the machine you are trying to run the app on.
The redistributable for 2008 is here.
The redistributable for 2005 is here.
They can be installed side-by-side, in case you need both.
You probably need to distribute the VC runtime with your application. There are a variety of ways to do this. This article from the Microsoft Visual C++ Team best explains the different ways to distribute these dependencies if you are using Visual Studio 2005 or 2008.
As stated in the article, though you can download the Redistributable installer package and simply launch that on the client machine, that is almost always not the optimal option. There are usually better ways to include the required DLLs such as including the merge module if you are distributing via Windows Setup or App-Local copy if you just want to distribute a zipped folder.
Another option is to statically link against the runtime libraries, instead of distributing them with your application. This option is only suitable for standalone EXEs that do not load other DLLs. You also cannot do this with DLLs that are loaded by other applications.
It is much the simplest to link to the runtime statically.
c++ -> Code Generation -> Runtime Library and select "multi-threaded /MT"
However, this does make your executable a couple hundred KByte larger. This might be a problem if you are installing a large number of small programs, since each will be burdened by its very own copy of the runtime. The answer is to create an installer.
New project -> "setup and deployment" -> "setup project"
Load the output from your application projects ( defined using the DLL version of the runtime ) into the installer project and build it. The dependency on the runtime DLL will be noticed, included in the installer package, and neatly and unobtrusively installed in the correct place on the target machine.
Visual studio 2005 actually has two
The one for the original release
and the one for SP1