开发者

How to redistribute vc++ application from visual studio 2008

开发者 https://www.devze.com 2023-03-04 03:36 出处:网络
I have developed a application in VC++ (Visual Studio 2008 version \'9.0.30729.1SP\'). When i just double click on exe file in another machine. it is giving me \'side by side\' error.

I have developed a application in VC++ (Visual Studio 2008 version '9.0.30729.1SP').

When i just double click on exe file in another machine. it is giving me 'side by side' error.

I have checked that machine does not having anything inside 'C:\Program Files\Microsoft Visual Studio 9.0\VC' folder. (but having framework 3.5 installed)

What i need to do?I am very new in VC++ applications.

Please can anyone explain how can i merge everything into a setup from machine where i have compiled my application.

Even 'C:\Program Files\Microsoft Visual Studio 9.0\开发者_C百科VC' folder also.

Please help in this issue.


The best thing to do is to create a setup program. It will automatically install all necessary dependencies onto the user's machine, along with your application. You definitely don't want to try to find all of the libraries it depends on by manually scouring your drive. And static linking is generally not a preferred option, as it means your app won't automatically take advantage of updates made to the runtime DLLs.

Visual Studio even has out-of-the-box support for creating an installer for your application. To use it, select File -> New -> New Project. Then expand "Other Project Types" in the dialog, and expand "Setup and Deployment". Click on "Visual Studio Installer", and choose to create a new "Setup Project".

   

How to redistribute vc++ application from visual studio 2008

Or, if you'd rather not use Visual Studio, the free, full-featured Inno Setup is a fantastic alternative.


Install the Visual C++ 2008 Redistributable package on the other machine. This will ensure that all the required CRT libraries are available. If your application needs any other DLLs, they need to be in the same folder (or in the system path) as your application.

If you want to do it properly, I highly recommend Cody's answer. But if you want to quickly run an application which may or may not have external DLLs, then this method will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号