Adding a static library build
-
Hi, I have a project which I originally built as an MFC extension DLL using Visual Studio 2008 App Wizard. I would now like to be able to build the same project as a static library but I don't know how to do this. Ideally, I would like to retain both DLL and static builds. Can anyone please advise? thanks Tony :thumbsup:
-
Hi, I have a project which I originally built as an MFC extension DLL using Visual Studio 2008 App Wizard. I would now like to be able to build the same project as a static library but I don't know how to do this. Ideally, I would like to retain both DLL and static builds. Can anyone please advise? thanks Tony :thumbsup:
In the toolbars at the top there is the configuration boxes, 1 containing Debug or Release and the other containing Win32. Drop down either of those boxes and select Configuration Manager. From the Configuration Manager you can add extra configurations to each individual project. Select the configuration (debug or release) next to your MFC DLL project and select from the dropdown. Call it Static Debug (or anything else if you feel like it) and then change Copy settings from: to Debug. Repeat again for Release, calling it Static Release. If you want to change the default configuration from DLL to static LIB then you can change the Configuration type for the MFC DLL in the Configuraion Manager that is to be build with the Debug and Release compiles. Close the Configuration Manager. Now right click on the MFC DLL project in the solution explorer and select Project Properties. Change the configuration at the top of the properties box to Static Debug, then go to the General page from the list at the left. change Configuration Type to Static Library. Do the same for Static Release. You may need to change a few other things as well, there is probably a definition in the C++>Preprocessor page for DLL or something that you will need to get rid of.
-
In the toolbars at the top there is the configuration boxes, 1 containing Debug or Release and the other containing Win32. Drop down either of those boxes and select Configuration Manager. From the Configuration Manager you can add extra configurations to each individual project. Select the configuration (debug or release) next to your MFC DLL project and select from the dropdown. Call it Static Debug (or anything else if you feel like it) and then change Copy settings from: to Debug. Repeat again for Release, calling it Static Release. If you want to change the default configuration from DLL to static LIB then you can change the Configuration type for the MFC DLL in the Configuraion Manager that is to be build with the Debug and Release compiles. Close the Configuration Manager. Now right click on the MFC DLL project in the solution explorer and select Project Properties. Change the configuration at the top of the properties box to Static Debug, then go to the General page from the list at the left. change Configuration Type to Static Library. Do the same for Static Release. You may need to change a few other things as well, there is probably a definition in the C++>Preprocessor page for DLL or something that you will need to get rid of.
Thanks Andrew, this is exactly the information I needed. :thumbsup: :thumbsup: Tony :)