Click here to Skip to main content
16,019,055 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a C++ project created in Visual Studio 6, the project uses MFC (Microsoft Foundation Classes). How do I create a installer/setup for my project? Thank you.
Posted
Updated 13-May-10 7:22am
v2

With an installer creator, like Advanced Installer. You just need to make sure, if you didn't dynamically link the MFC code you need into your exe, that you distribute the MFC dlls and put them in the right place.

VC6 was rubbish, in terms of being good C++, why are you still using it ?
 
Share this answer
 
A very good free installer is Inno Setup. You can download it at http://www.jrsoftware.org/isinfo.php[^]

As Christian Graus already wrote, you should keep attention to the dependencies of your project, like ATL, MFC and the Microsoft Visual C/C++ runtime DLLs. As the Visual Studio 6 doesn't create binaries that use the manifest mechanism, you can redistribute the required DLLs in two ways:


    • as shared libraries, i.e. installing them in the System32 folder (on Inno Setup you should remember to set the shared flag for that files, so that the operating system will hold a reference counter for each of them)

    • as private libraries, i.e. installing them in the same folder where all the executables of your project are located



Note that installing the runtime libraries as shared assemblies could create problems (try searching DLL hell on Google), and Microsoft strongly recommend to install them as private libraries.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900