0

I've built this really simple mulithreaded winsock tcp based multi-user chat in C++.

I'm personally running a 32 bit windows 7 version, the chat works fine and now I want to test it among different computers in my LAN, simply for the example, I would like to run my client.exe file within another computer, a windows 7 that runs 64 bit.

so I have a few questions before doing so:

  1. firstly assuming both computes run x86 architecture It shouldn't be a problem to transport those .exe files and run them on different computers right?
  2. now my second question is missing dll's, when tried executing my client.exe file on the other computer, a missing "MSVCR120.dll" dll error message has popped. which actually makes sense as the computers may be architecture compatible but may have different dll's. so my question is, if within my C++ Client.exe file source code, I will load the MSVCR120.dll and include it to the folder of my Client.exe file, would that solve my problem?
DrPrItay
  • 726
  • 5
  • 18
  • ***a missing "MSVCR120.dll" dll error message has popped.*** You need to install the Visual Studio 2013 redistributable on these computers. – drescherjm Apr 27 '16 at 18:43
  • That's the exact opposite of what I wish to do, I want that computers that I implement my program on won't have to install visual studio 2013, I wanna load that dll for them.. @drescherjm – DrPrItay Apr 27 '16 at 18:47
  • 1
    You don't install visual studio 2013. Just the runtime. The answer points out the file you need to install. – drescherjm Apr 27 '16 at 18:48

2 Answers2

2

You have two options:

  1. To create installation package for your exe that includes VC++ redistribuables.
  2. To compile your exe with VC++ runtime compiled in as a static library.

In second case you don't need installation package, just copy the exe on target machine and run it from there.

Community
  • 1
  • 1
c-smile
  • 24,546
  • 7
  • 54
  • 79
0

if you built you program with visual studio, you will need to install Microsoft redistribuables:https://support.microsoft.com/en-us/kb/2977003

Regards

Eric T.
  • 66
  • 5
  • Could you please be more specific to my question? the program runs fine on my computer, I want to run it on other computers without having to download special tools on their computers, just by loading dll's from within my code into their computer @Eric T. – DrPrItay Apr 27 '16 at 18:49
  • Just download the redistibutable for Visual Studio 2013 and install that on the machines that need it. https://www.microsoft.com/en-us/download/details.aspx?id=40784 Since you said the program is 32 bit you need the 6.2 MB vcredist_x86.exe file. – drescherjm Apr 27 '16 at 18:50
  • You program depends on DLL to run, e.g. not all the function are in your program. When you installed Visual studio on you you development PC, the installer install all the needed DLL to run programs generated by Visual Studio. If you want to run your program on another PC you will have to install at least the the runtime DLL. Most program install includes the DLL they depend on in their own installer. – Eric T. Apr 27 '16 at 18:51