Menu

Configuring_Visual_C++_2005-2008_OWLNext_Projects

Configuring Visual C++ 2005/2008 OWLNext Projects

An OWLNext application can be built with different combinations of options: Debug or Release, Static or Dynamic linking of the libraries, Unicode or Multi-byte character set. By using the Configuration Manager of Visual C++, it's easy to be able to build all of these combinations from a single VC++ project.

The instruction here detail how to manually setup Visual C++ OWLNext projects. The same configuration can be created automatically by the OWLNext Application Wizard.

When creating an new project, by default two configuration settings are created - Debug and Release. To edit them, right-click on the project root and select Properties to open the Property Pages dialog. Then, click the "Configuration Manager" button to open the dialog:

From the combobox in the Configuration column of the project, select the "<Edit…>" option to open the "Edit Project Configuration" dialog and use it to rename the two configurations to "Dynamic Debug" and "Dynamic Release":

Close the renaming dialog and the coniguration manager dialog and return to the Property Pages. Make sure that the "Dynamic Debug" configuration is selected, go to the General page, and for the "Character Set" select the "Use Multi-Byte Character Set" option:

Then, go to C/C++ Preprocessor page and add _OWLDLL to the "Preprocessor Definitions":

Do the same for the "Dynamic Release" configuration. Test both configurations to see if they are building without problems.

Now, open again the Configuration Manager and from the combobox in the Configuration column, select the "<New…>" option and create a new configuration named "Static Debug" based on "Dynamic Debug":

Create another one, named "Static Release", based on "Dynamic Release". For both new configuations, remove the _OWLDLL, then go to the C/C++ Code Generation page and for the "Static Release" configuration, select "Multi-threaded (/MT)" in the "Runtime Library" setting:

For the "Static Debug" configuration, select "Multi-threaded Debug (/MTd)" in the "Runtime Library" setting. Build both configurations.

Now, create 4 new configurations, named "Unicode Dynamic Debug", "Unicode Dynamic Release", "Unicode Static Debug" and "Unicode Static Release", based on the corresponding multi-byte configurations. For each of these configuration, on the General page, select "Use Unicode Character Set" for the "Character Set" option, and on the Linker / Advanced page, set wWinMainCRTStartup as the &Entry Point":

The resulting solution for Visual C++ 2008, containing all eight configurations, can be downloaded here and used as a base for new OWLNext applications.


Related

Wiki: Setting_up_Visual_C++_2005-2008

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.