1.2.1 Creating and Configuring a Project
This document contains instructions how to create a C++ project compatible with Soul tools and libraries using Visual Studio 2022.
Creating a Project
- Create an empty C++ Console Application (.exe) project using Visual Studio 2022 Windows Desktop Wizard project template.
- Right-click the project in the Solution Explorer and select 'Add New Item...'.
- Select C++ File (.cpp) item and name the source file to 'main.cpp'.
-
Add the following code to the 'main.cpp' file:
int main()
{
return 0;
}
Setting Values of Boost Library Macros
-
If you have no Property Manager tab page in the Solution Explorer, select View | Other Windows | Property Manager
- Select the Property Manager tab in the Solution Explorer.
- In the Property Manager, right-click your project and select Add Existing Property Sheet...
-
Navigate to the C:\soul-4.0.0\config
folder and add the build.props
file.
-
Open the
project
| Debug | x64
folder in the Property Manager, right-click the build
configuration and select Properties
-
Select the User Macros
property page and enter paths to your Boost include directory and Boost library directory in the Value field for the BOOST_INCLUDE_DIR
and BOOST_LIB_DIR
macros:
Setting Project Properties
- Select the Solution Explorer tab in the Solution Explorer window, right-click the project in the Solution Explorer and select 'Properties...'.
-
Select the Debug | x64
configuration.
-
Set the values in the General Properties tab page:
-
Set the values in the C++ | General tab page:
-
Set the values in the C++ | Language tab page:
-
Set the values in the C++ | Advanced tab page (to suppress spurious warnings):
-
Set the values in the Linker | General tab page:
-
Select the Release | x64
configuration.
-
Set the values in the General Properties tab page:
-
The changed settings in the C++ | General
, C++ | Language
, C++ | Advanced
and Linker | General
property pages are the same as for the x64 | Debug
configuration. Other settings are defaults for the x64 | Release
configuration.