Problems with running EXE file built with Visual Studio on another computer

前端 未结 5 961
独厮守ぢ
独厮守ぢ 2020-12-05 07:22

I created a client server application in C++ using Visual Studio.

Now I want to run the client EXE file on another computer (which doesn\'t have Visual Studio instal

5条回答
  •  春和景丽
    2020-12-05 08:24

    Background:

    • C++ applications need run-time assemblies (DLL files) to run in any Windows computer.
    • Normally these run-time assemblies are located at C:\Windows\Winsxs directory.
    • All the Windows operating systems by default comes with several run time assemblies.
    • But if your application is developed in a newer version of the run-time assembly environment, the target computer also needs the same version of the run time to exist there.
    • When you're installing Visual Studio, most newer versions of the run-time assemblies comes to your computer.

    Solution:

    Finally by anyway the target computer should have the exact run time assemblies. There are a few ways to do this (for more details search each in Google).

    1. Statically link run-time assemblies with your application (troublesome for large application).
    2. Install the C++ redistribution environment on the target computer (the easiest way).
    3. Creating a setup project to deploy the run-time on the target computer when installing the application (not bad).
    4. For deploying run-time assemblies as private assemblies (professional), see here for more details

    Conditions:

    • You must not use .NET framework in your application.
    • You must not use the common language run-time support for your application

提交回复
热议问题