I have compiled simple visual basic C++ form application that works on the machine that compiled it in visual c++ 2012 express. However, upon transferring the application exe to a different machine, it says that a certain dll is missing, that is, the MS visual c++ 2012 dll called "msvcr110.dll". Bear in mind I DONT want to download this onto the NEW machine from microsoft but rather package this dll as part of the installation file of the application. The reason for this is I don't want the end user to run a separate MS run-time 2012 installations. I also wouldn't like to statically link anything beforehand.
First I made sure it was compiled as a release and not a debug exe and it was. So then what I did is found "msvcr110.dll" on the compiled machines system 32 windows folder (as MS visual C++ did a run time installation on this host machine already and hence why it runs okay). I took this dll and copied it to either the new machines system 32 folder and/or the new machines e same folder that the application runs in. Upon doing so, I was prompted with the error: "The application was unable to start correctly (0xc000007b)". After researching this it seems the culprit is most likely a 32 (x86) to 64 bit compatibility issue.
I ran the tool dependancy walker (Dependency Walker (depends.exe) Home Page) on the original machine and nothing came up ofcoarse as it obviously runs fine there. On running dependancy walker on the new machine I see that the msvcr110.dll has "64" written next to it which was flagged as red.
Questions: 1) I think this is the problem and don't know how to resolve it. Im assuming I just download the run time VC++2012 and package that as part of the installation folder? But this has technically been done as I already have the dll on the compiled machine as VC++ has already been installed there and thats the dll I sopied across. 2) Further I don't know WHY it is a problem in the first place. Both machines have 64 bit CPU's. Both machines run windows 64 bit. The MS Visual C++ that installed and hence ran the run time installation could have been EITHER 32 or 64 bit because a 32 bit can run on 64, and, anyway, the same dll ran fine on the host machine and not on the new machine.